You are making the mistake of thinking there are two different sets of laws. He's speaking of two different principles, or rules, of how to be justified. The 'law' of works is, "I am justified by doing righteous work". The 'law' of faith is, "I am justified by faith in Jesus Christ apart from works".
There is the law of Moses and the works of that law, that are required of those who are in that covenant.
knowing that a man
is not justified by the works of the law but
by faith in Jesus Christ, even we have believed in Christ Jesus, that we might be justified by faith in Christ and not by the works of the law; for by the works of the law no flesh shall be justified.
Galatians 2:16
Then there is the law of faith , which Paul contrast's with the law of Moses -
20 Therefore by the deeds of the law no flesh will be justified in His sight, for by the law is the knowledge of sin.
21 But now the righteousness of God apart from the law is revealed, being witnessed by the Law and the Prophets...
27 Where is boasting then? It is excluded. By what law? Of works? No, but by the law of faith.
28 Therefore we conclude that a man is justified by faith apart from the deeds of the law.
Romans 3:20-21,27,28
The law of faith carries the same measure of "weight" as the law of Moses, in that both
require obedience, as we learn from the scriptures.
One law requires that a person obey and do all the ordinances and commandments that are required by the law of Moses -
For as many as are of the works of the law are under the curse; for it is written, "Cursed is everyone who does not
continue in all things which are written in the book of the law,
to do them." Galatians 3:10
...to do them = obedience - Law of Moses
Was not Abraham our father
justified by works when he offered Isaac his son on the altar?
James 2:21
doing what God tells you to do [ex: offering Issac on the altar] =
obedience - Law of faith
Same measure of weight as the law of Moses.
The difference is one is doing a set of prescribed rules that doesn't require a relationship with God, the other involves a person hearing God themselves and obeying Him.
31 "Behold, the days are coming, says the Lord, when I will make a new covenant with the house of Israel and with the house of Judah--
32 not according to the covenant that I made with their fathers in the day that I took them by the hand to lead them out of the land of Egypt, My covenant which they broke, though I was a husband to them, says the Lord.
33 But this is the covenant that I will make with the house of Israel after those days, says the Lord: I will put My law in their minds, and write it on their hearts; and I will be their God, and they shall be My people.
34 No more shall every man teach his neighbor, and every man his brother, saying, 'Know the Lord,'
for they all shall know Me, from the least of them to the greatest of them, says the Lord. For I will forgive their iniquity, and their sin I will remember no more."
Jeremiah 31:33-34\
not according to the covenant that I made with their fathers in the day that I took them by the hand to lead them out of the land of Egypt...for they all shall know Me,
Abraham walked with God in relationship, and learned from Him and obeyed His Voice.
This is the work of the obedience of faith. This is the law of faith in action, for faith without the work of obedience is dead.
But now is made manifest, and by the scriptures of the prophets, according to t
he commandment of the everlasting God, made known to all nations
for the obedience of faith:
Romans 16:26
JLB
The law is not of faith.