While many of EGW statements are in line with the Bible, some I question. This is one of them, but that's okay because she would tell me go to your Bible because ultimately that is the measuring stick of truth. The Bible, she would say, is the infallible source and she, although guided by the Spirit, was fallible.
Taking her advice let's look at James 2:24
"You see that a person is justified by works and not by faith alone."
In other words a person's actions proves their faith. Here James is not speaking of law oriented works, but works of faith.
25 Likewise, was not Rahab the prostitute also justified by works when she welcomed the messengers and sent them out by another road?
When was Rahab justified by her works of faith, after she left her life of prostitution, or before?
Answer: Before!
Rahab was still a prostitute, yet James stated she stood just before God. How so?
If you read the story Rahab put her life on the line in order to save the two Israeli spies. That's a faith that works....She believed in the God of Israeli and her work of faith proved it.
So she was justified while still a sinner....
Now Paul:
Romans 4: 2 For if Abraham was justified by works (law obedience), he has something to boast about, but not before God. 3 For what does the scripture say? "Abraham believed God, and it was reckoned to him as righteousness."
God took Abraham where he was at.
God took Rahab where she was at.
God accepts sinners just as they are. As they rest in His finished work then a change takes place.