"You see that a person is justified by works and not by faith alone" - the Holy Spirit, James 2:24.
Justified has more than one Biblical definition:
1. to show or prove to be just, right, or reasonable: The pleasure we get from these paintings justifies their high cost.
2. to defend or uphold as warranted or well-grounded: Don't try to justify his rudeness.
3. to declare innocent or guiltless; absolve; acquit.
justify
Faith justifies in that it
makes you righteous (see definition #3 above). This is Paul's argument.
Faith all by itself without works secures the righteousness that
comes from God, not from you - Romans 3:21. If you had sufficient righteousness to reach out to God to be justified
you wouldn't need the righteousness that comes from God. That's why the works argument for justification of the Catholics (being made righteous by faith
and works) is a works gospel.
Work justifies in that it
shows you to have the righteousness that comes from God (see definition #1 above). That's James' argument (James 2:18, James 2:24).
These two different definitions and usages of 'justified' is what keeps James' argument (James 2:24) from contradicting Paul's argument (Romans 3:28, Romans 4:2, Romans 4:5-6). This simple truth evades the priesthood of the Catholic church. And so they invented this false teaching that says 'faith is works' in their vain attempt to reconcile the two. But all they ended up doing is creating the very works gospel that Paul warned us about. But that seems to be what the Catholic church is all about - getting people to do what the Bible says not to do. This is just another example of that.