"The apostles of nearly all forms of spiritism claim to have power to heal. They attribute this power to electricity, magnetism, the so-called “sympathetic remedies,” or to latent forces within the mind of man. And there are not a few, even in this Christian age, who go to these healers, instead of trusting in the power of the living God and the skill of well-qualified physicians. The mother, watching by the sickbed of her child, exclaims, “I can do no more. Is there no physician who has power to restore my child?” She is told of the wonderful cures performed by some clairvoyant or magnetic healer, and she trusts her dear one to his charge, placing it as verily in the hand of Satan as if he were standing by her side. In many instances the future life of the child is controlled by a satanic power which it seems impossible to break. PK 211.1"
"Many will say to me in that day, Lord, Lord, have we not prophesied in thy name? and in thy name have cast out devils? and in thy name done many wonderful works?"
Both passages address the idea of people performing seemingly miraculous acts but not being aligned with God. The EGW passage applies this to spiritual healers, while Matthew 7:22 speaks of those who prophesy and cast out devils in Jesus' name but are ultimately rejected.
"when they turn from the Source of strength and wisdom to ask help or counsel from the powers of darkness. If God's wrath was kindled by Ahaziah's act, how does He regard those who, having still greater light, choose to follow a similar course? PK 211.2"
"And when they shall say unto you, Seek unto them that have familiar spirits, and unto wizards that peep, and that mutter: should not a people seek unto their God? for the living to the dead?"
The EGW passage directly references the principle of seeking God rather than turning to mediums and wizards, as condemned in Isaiah 8:19. The reference to Ahaziah further strengthens this connection.
"There shall not be found among you any one that maketh his son or his daughter to pass through the fire, or that useth divination, or an observer of times, or an enchanter, or a witch, Or a charmer, or a consulter with familiar spirits, or a wizard, or a necromancer. For all that do these things are an abomination unto the Lord: and because of these abominations the Lord thy God doth drive them out from before thee."
The EGW passage echoes the principle of avoiding divination and consulting with familiar spirits, as outlined in Deuteronomy 18:10-12. Both passages condemn seeking help from sources other than God.