"But while the followers of Christ have sinned, they have not given themselves up to be controlled by the satanic agencies. They have repented of their sins and have sought the Lord in humility and contrition, and the divine Advocate pleads in their behalf. He who has been most abused by their ingratitude, who knows their sin and also their penitence, declares: “The Lord rebuke thee, O Satan. I gave My life for these souls. They are graven upon the palms of My hands. They may have imperfections of character; they may have failed in their endeavors; but they have repented, and I have forgiven and accepted them.” PK 589.1"
"And the Lord said unto Satan, The Lord rebuke thee, O Satan; even the Lord that hath chosen Jerusalem rebuke thee: is not this a brand plucked out of the fire?"
The EGW passage directly quotes and expands upon Zechariah 3:2, where the Lord rebukes Satan. The context is similar: Satan accusing God's people, and God defending them.
"The assaults of Satan are strong, his delusions are subtle; but the Lord's eye is upon His people. Their affliction is great, the flames of the furnace seem about to consume them; but Jesus will bring them forth as gold tried in the fire. Their earthliness will be removed, that through them the image of Christ may be perfectly revealed. PK 589.2"
"That the trial of your faith, being much more precious than of gold that perisheth, though it be tried with fire, might be found unto praise and honour and glory at the appearing of Jesus Christ:"
Both passages use the metaphor of fire refining gold to illustrate the process of spiritual purification and the strengthening of faith through trials. The connection is clear and intentional.