And then there is St. Paul’s letter to the Galatians, the third chapter: Does God give you his Spirit and work miracles among you by the works of the law, or by your believing what you heard? So also, Abraham “believed God, and it was credited to him as righteousness.”What does Scripture say? “Abraham believed God, and it was credited to him as righteousness.” Now to the one who works, wages are not credited as a gift but as an obligation. However, to the one who does not work but trusts God who justifies the ungodly, their faith is credited as righteousness. Under what circumstances was it credited? Was it after he was circumcised, or before? It was not after, but before! So then, he is the father of all who believe but have not been circumcised, in order that righteousness might be credited to them. And he is then also the father of the circumcised who not only are circumcised but who also follow in the footsteps of the faith that our father Abraham had before he was circumcised…. So where then is boasting? It is excluded. Because of what law? The law that requires works? No, because of the law that requires faith. For we maintain that a person is justified by faith apart from the works of the law. (Romans 4:3 and following)
It certainly seems that St. James and St. Paul are disagreeing with each other. Your first problem is that you are assuming that the Bible is a book. It is not a book. It is a collection of books each of which has its own context and vocabulary.And the Scripture was fulfilled that says, “Abraham believed God, and it was credited to him as righteousness,” and he was called a friend of God. As you can see, a man is justified by his works and not by faith alone.