"The destroying angel had stayed his course outside Jerusalem. He stood upon Mount Moriah, “in the threshing floor of Ornan the Jebusite.” Directed by the prophet, David went to the mountain, and there built an altar to the Lord, “and offered burnt offerings and peace offerings, and called upon the Lord; and He answered him from heaven by fire upon the altar of burnt offering.” “So the Lord was entreated for the land, and the plague was stayed from Israel.” PP 748.4"
"And David built there an altar unto the Lord, and offered burnt offerings and peace offerings. So the Lord was intreated for the land, and the plague was stayed from Israel."
The EGW passage directly quotes and references 2 Samuel 24:25, describing David building an altar and the plague being stayed. This is a clear and direct allusion.
"The spot upon which the altar was erected, henceforth ever to be regarded as holy ground, was tendered to the king by Ornan as a gift. But the king declined thus to receive it. “I will verily buy it for the full price,” he said; “for I will not take that which is thine for the Lord, nor offer burnt offerings without cost. So David gave to Ornan for the place six hundred shekels of gold by weight.” This spot, memorable as the place where Abraham had built the altar to offer up his son, and now hallowed by this great deliverance, was afterward chosen as the site of the temple erected by Solomon. PP 748.5"
"And the king said unto Araunah, Nay; but I will surely buy it of thee at a price: neither will I offer burnt offerings unto the Lord my God of that which doth cost me nothing. So David bought the threshingfloor and the oxen for fifty shekels of silver."
The EGW passage directly quotes and elaborates on the 2 Samuel passage, providing additional context from 1 Chronicles 21:25. The core idea of David purchasing the threshing floor and refusing to offer sacrifices that cost him nothing is central to both.