James 2:24 says: "A person is justified by works and not by faith alone."
Romans 4:5 says: "To him who does not work, but believes in Him who justifies the ungodly, his faith is counted for righteousness."
Is this a contradiction? No.
The answer is found by reading Scripture ...
I agree that the answer is found reading Scripture, but it is
not the answer provided by the OP. Definitely not.
What most persons responding seemed to have missed, over looked, or not mentioned (unless I missed such, and if that is the case I apologize to that/those person/s), is that
the OP is entirely from a human-only perspective,
as if the Holy Ghost / Spirit was not the one moving upon both James and Paul to write what they did in their differing areas and times.
In other words, the Holy Ghost is beyond those areas and times and persons, and not merely relegated to just those areas and times and persons. The Holy Ghost sees the end from the beginning (Isa. 46:9-10), being the eternal Witness of all things (even of the eternal events of the Father & Son in all eternity), and therefore, the OP is way off base, denying the heavenly influence, and relegating the scripture into piecemeal earthly elements (men only), fractured by time, place and personality. If that was the case for James and Paul as the OP says, then what of all the other places in scripture with similar 'discrepancies' (No, there are no real discrepancies in scripture), between OT writers, and OT to NT writers, and among other NT writers? Reducing such an 'apparent contradiction' in Paul & James' materials to merely their human element, is to miss who is the real author of the scriptures, and there is no half-way measure with God. There is an unfolding to be sure, from beginning to ending, but all of the unfolded ending is still in the beginning seed. In other words, the full gospel has always been there, from seed form in Genesis to fullness of the tree (Calvary) form.
The OP needs to re-read the following, and take it to heart, and start all over again in their understanding:
2Ti 3:15 And that from a child thou hast known
the holy scriptures,
which are able to make thee wise unto salvation through faith which is in Christ Jesus.
2Ti 3:16
All scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness:
2Ti 3:17
That the man of God may be perfect, throughly furnished unto all good works.
2Pe 1:19 We have also
a more sure word of prophecy; whereunto ye do well that ye take heed, as unto a light that shineth in a dark place, until the day dawn, and the day star arise in your hearts:
2Pe 1:20 Knowing this first, that no prophecy of
the scripture is of any private interpretation.
2Pe 1:21 For the prophecy came not in old time by the will of man: but
holy men of God spake as they were moved by the Holy Ghost.
Mar_12:36 For
David himself said by the Holy Ghost, The LORD said to my Lord, Sit thou on my right hand, till I make thine enemies thy footstool.
Luk 1:67 And his father Zacharias was
filled with the Holy Ghost, and prophesied, saying,
Luk 1:68 Blessed be
the Lord God of Israel; for he hath visited and redeemed his people,
Luk 1:69 And hath raised up
an horn of salvation for us in the house of his servant David;
Luk 1:70 As
he spake by the mouth of his holy prophets,
which have been since the world began:
Luk_2:26 And
it was revealed unto him by the Holy Ghost, that he should not see death, before he had seen the Lord's Christ.
Act_1:16 Men and brethren, this scripture must needs have been fulfilled,
which the Holy Ghost by the mouth of David spake before concerning Judas, which was guide to them that took Jesus.
Act_3:21 Whom the heaven must receive until the times of restitution of all things,
which God hath spoken by the mouth of all his holy prophets since the world began.
Act_13:4 So
they, being sent forth by the Holy Ghost, departed unto Seleucia; and from thence they sailed to Cyprus.
Act_28:25 And when they agreed not among themselves, they departed, after that Paul had spoken one word,
Well spake the Holy Ghost by Esaias the prophet unto our fathers,
Rom 1:1
Paul,
a servant of Jesus Christ, called to be an apostle,
separated unto the gospel of God,
Rom 1:2 (Which
he had promised afore by his prophets in the holy scriptures,)
Rom_5:5 And hope maketh not ashamed; because the love of God is shed abroad in our hearts
by the Holy Ghost which is given unto us.
Rom_15:16 That I should be the minister of Jesus Christ to the Gentiles,
ministering the gospel of God, that the offering up of the Gentiles might be acceptable, being
sanctified by the Holy Ghost.
1Co_12:3 Wherefore I give you to understand, that no
man speaking by the Spirit of God calleth Jesus accursed: and that
no man can say that Jesus is the Lord, but by the Holy Ghost.
2Co_6:6 By pureness, by knowledge, by longsuffering, by kindness,
by the Holy Ghost, by love unfeigned,
2Co_13:14 The grace of the Lord Jesus Christ, and the love of God, and
the communion of the Holy Ghost, be with you all. Amen.
Eph_3:5 Which in other ages was not made known unto the sons of men, as it is now revealed unto his
holy apostles and prophets by the Spirit;
2Ti_1:14 That good thing which was committed unto thee
keep by the Holy Ghost which dwelleth in us.
Tit_3:5 Not by works of righteousness which we have done, but according to his mercy he saved us, by the washing of regeneration, and
renewing of the Holy Ghost;
1Pe_1:12 Unto whom it was revealed, that not unto themselves, but unto us they did minister the things, which are now reported unto you by
them that have preached the gospel unto you with the Holy Ghost sent down from heaven; which things the angels desire to look into.
What does James say he is?
Jas 1:1 James,
a servant of God and of the Lord Jesus Christ, to the twelve tribes which are scattered abroad, greeting.
Jas 5:10 Take,
my brethren, the prophets,
who have spoken in the name of the Lord, for an example of suffering affliction, and of patience.
Paul specifically said after meeting with the early Apostles:
Gal_2:6 But of these who seemed to be somewhat, (whatsoever they were, it maketh no matter to me: God accepteth no man's person

for they who seemed to be somewhat in conference
added nothing to me: