James is using this rhetorical question to instruct his audience. Alternate translation: "it was what Rahab the prostitute did that justified her ... another road." (See: [[rc://en/ta/man/translate/figs-rquestion]] and [[rc://en/ta/man/translate/figs-activepassive]])
# was not Rahab the prostitute justified by works ... another road?
This can be restated to remove the abstract noun "works." This can also be stated in active form. Alternate translation: "did God not justify Rahab the prostitute because of what she did ... another road?" or "God justified Rahab the prostitute because of what she did ... another road." (See: [[rc://en/ta/man/translate/figs-abstractnouns]] and [[rc://en/ta/man/translate/figs-activepassive]])