Is James in conflict with the rest of scripture, even in the Old Testament in Habakkuk says that the just shall live by faith, salvation is by grace alone, it is by faith and not of works according to Ephesians 2, 8 and 9.
So what is James saying when he says Abraham our father was justified by works? That while justification before God was not by works, being righteous before God was not by works, being deemed righteous by men was by works.
In other words, show me your works and I’ll believe in your faith and that’s what James says, your true salvation by faith is demonstrated in your works. That’s why Paul says in Philippians, work out your salvation, God has worked it in and you work it out. So when we look at Abraham and see him willing to offer up his son as an act of Obedience we know that God has transformed his heart.