Romans 10:3-8 (KJV)
3 For they being ignorant of God's righteousness, and going about to establish their own righteousness, have not submitted themselves
unto the righteousness of God.
4 For Christ is the end of the law for righteousness to every one that believeth.
[For Christ is the goal of the Father’s instructions, providing
righteousness to every one that believeth]
5 For Moses describeth the righteousness which is of the law, That the man which doeth those things shall live by them. 6 But the
righteousness which is of faith speaketh on this wise... [Paul quotes Deu. 30:11-14]
Romans 8:3-4: For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of
sinful flesh, and for sin, condemned sin in the flesh: That the
righteousness of the law might be fulfilled in us, who walk not
after the flesh, but after the Spirit.
The "righteousness of faith” referenced from Deuteronomy 30 was veiled for many in the past. The word law also comes from the Hebrew word torah, meaning instructions, which more accurately describes the thought being conveyed. (And when our flesh is connected to the law, the law is weak).
V. 4: The word telos can mean the purpose or goal of a thing. One might ask, "to what end are you attending college?” This is clear in the NKJV’s and NIV’s rendering of 1 Timothy 1:5, and 1 Peter 1:9 usage of telos. It was a commonly used word by great thinkers like Aristotle who used it in relation to complex ideas like the ultimate goal of human interactions (happiness), the goal of business (the creation of wealth): a concept the Romans Paul was writing to would have been familiar with. Reason was one of Paul’s methods of interaction, and speaking within his neighbor's world view (1 Co. 9:21-22; Acts 18:4).
Thus, in the context of attaining God’s righteousness, in a long term philosophical view, the purpose or goal of the law has always been for Christ to provide righteousness through it. Paul touches on this goal two chapters prior.
V. 5-6: There is no grammar in the original Greek nor verse numbers: adding every period or comma in is a translators choice. Verses 3-4 could have been represented as a single sentence, as could 5-6. Verses 5-6 call back to verses 3 and 4 in their presented order (having an odd callback sequence like that seen in Galatians 3:13-14).
True faith establishes the law (Ro. 3:31):
Luke 1:6: ...they were both righteous… walking in all the commandments…
2 K. 23:25: [King Josiah:] ...turned to the Lord with all his heart... according to all the law of Moses...