Paul is using the word justified to mean “declared righteous by God.” Paul is speaking of God’s legal declaration of us as righteous as Christ’s righteousness is applied to our account. James is using the word justified to mean “being demonstrated and proved.”