"We all desire immediate and direct answers to our prayers, and are tempted to become discouraged when the answer is delayed or comes in an unlooked-for form. But God is too wise and good to answer our prayers always at just the time and in just the manner we desire. He will do more and better for us than to accomplish all our wishes. And because we can trust His wisdom and love, we should not ask Him to concede to our will, but should seek to enter into and accomplish His purpose. Our desires and interests should be lost in His will. GW 219.1 These experiences that test faith are for our benefit. By them it is made manifest whether our faith is true and sincere, resting on the word of God alone, or whether, depending on circumstances, it is uncertain and changeable. Faith is strengthened by exercise. We must let patience have its perfect work, remembering that there are precious promises in the Scriptures for those who wait upon the Lord. GW 219.2"
"Ye ask, and receive not, because ye ask amiss, that ye may consume it upon your lusts."
Both passages discuss the idea of unanswered prayer and the reasons behind it. James 4:3 speaks of asking with wrong motives, while the EGW passage speaks of God's wisdom in answering prayers in ways we may not expect or desire. The connection is thematic, dealing with the complexities of prayer and divine response.
"Not all understand these principles. Many who seek the Lord's healing mercy think that they must have a direct and immediate answer to their prayers or their faith is defective. For this reason those who are weakened by disease need to be counseled wisely, that they may act with discretion. They should not disregard their duty to the friends who may survive them, or neglect to employ nature's agencies for the restoration of health. GW 219.3 Often there is danger of error here. Believing that they will be healed in answer to prayer, some fear to do anything that might seem to indicate a lack of faith. But they should not neglect to set their affairs in order as they would desire to do if they expected to be removed by death. Nor should they fear to utter words of encouragement or counsel which at the parting hour they wish to speak to their loved ones. GW 219.4"
"And the prayer of faith shall save the sick, and the Lord shall raise him up; and if he have committed sins, they shall be forgiven him."
Both passages address prayer for healing. James 5:15 speaks of the prayer of faith saving the sick, while the EGW passage discusses the need for wisdom and discretion when seeking healing through prayer, emphasizing the importance of not neglecting other means of restoration or practical responsibilities. The connection lies in the shared topic of faith and healing.