Romans 10:5
5 For Moses describeth the righteousness which is of the law, That the man which doeth those things shall live by them.
Galatians 3:12
12 And the law is not of faith: but, The man that doeth them shall live in them.
Do the above verses teach that it is (or was) possible to be justified by the Law?
First, looking at the passage in Romans 10, we can see that it is both preceded and followed by verses which make a "justification by the Law" interpretation impossible:
Romans 10:3-11
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.
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, Say not in thine heart, Who shall ascend into heaven? (that is, to bring Christ down from above:)
7 Or, Who shall descend into the deep? (that is, to bring up Christ again from the dead.)
8 But what saith it? The word is nigh thee, even in thy mouth, and in thy heart: that is, the word of faith, which we preach;
9 That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved.
10 For with the heart man believeth unto righteousness; and with the mouth confession is made unto salvation.
11 For the scripture saith, Whosoever believeth on him shall not be ashamed.
Above, we see that before "the righteousness which is of the Law" (Romans 10:5) is even mentioned, we are told that "Christ is the end of the Law for righteousness to every one that believeth" (Romans 10:4), and that it is only through "ignorance" that someone would go about to "establish their own righteousness" based on the Law (Romans 10:3), which carries over a theme from the previous chapter:
Romans 9:30-33
30 What shall we say then? That the Gentiles, which followed not after righteousness, have attained to righteousness, even the righteousness which is of faith.
31 But Israel, which followed after the law of righteousness, hath not attained to the law of righteousness.
32 Wherefore? Because they sought it not by faith, but as it were by the works of the law. For they stumbled at that stumblingstone;
33 As it is written, Behold, I lay in Sion a stumblingstone and rock of offence: and whosoever believeth on him shall not be ashamed.
In the passage above, and in the passage in Romans 10 following our verse in question, notice that "the righteousness which is of the law" is immediately contrasted with the "righteousness which is of faith" (Romans 10:6), which is the "righteousness of God" (Romans 10:3), as we see elsewhere:
Philippians 3:9
9 And be found in him, not having mine own righteousness, which is of the law, but that which is through the faith of Christ, the righteousness which is of God by faith:
Faith, then, is the means by which to obtain the "righteousness of God", and it would be an error to try any other method, or attempt to mix another method into that equation.
Our verse in question should also be considered in the broader context of the book of Romans, in which it has already been made clear towards the beginning of the Epistle that no one can be justified by keeping the Law (Romans 3:20-28).
The above procedure can be repeated with the context of the passage in Galatians, where we read:
Galatians 3:10-13
10 For as many as are of the works of the law are under the curse: for it is written, Cursed is every one that continueth not in all things which are written in the book of the law to do them.
11 But that no man is justified by the law in the sight of God, it is evident: for, The just shall live by faith.
12 And the law is not of faith: but, The man that doeth them shall live in them.
13 Christ hath redeemed us from the curse of the law, being made a curse for us: for it is written, Cursed is every one that hangeth on a tree:
Clearly, the Apostle Paul did not mean to impart with verse 12, a teaching directly opposing verse 11. The idea that Galatians 3:12 is a prescription to try to obtain Eternal Life by the Law requires the verse to be taken completely out of the book of Galatians (Galatians 2:16, 2:21, 3:2-5, etc.).
Now that it's been established what these verses are not teaching - justification by the Law - we can investigate what they are teaching.
The verses are a quotation from the book of Leviticus:
Leviticus 18:5
5 Ye shall therefore keep my statutes, and my judgments: which if a man do, he shall live in them: I am the Lord.
Both in the verse above, and in its quotation in our verses in question, I believe that the life being imparted to those keeping the Law refers to primarily a blessed, abundant, physical life, but also, in a real way, Everlasting Life.
To paraphrase, "if a man keeps my commandments, he will live because of them". Amen. It is the absolute truth that if a man keeps the commandments of God, not only will God bless his life here on earth, but He will also give him Eternal Life, as that person will have justified themselves, which we saw back in chapter 2 of Romans:
Romans 2:13
13 For not the hearers of the law are just before God, but the doers of the law shall be justified.
However, as is covered in this article on the verse above, no one "does the Law", and no one "does the things" that the statutes mandated, which as mentioned already above, is the reason why none can be justified by the Law.
Instead, the Law, and mankind's universal failure to obtain life by it, was given to point to the Savior that God provided (Romans 3:19-20):
Galatians 3:24
24 Wherefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith.
Therefore, by mentioning the fact that all those who do the Law will live because of it, and then immediately contrasting the righteousness of that effort with the righteousness that God mandates, and can only be achieved by faith, the Apostle Paul is continuing a major theme of Romans and Galatians - relentless condemnation of trying to attain to God's standard by any means other than faith in the Messiah.
These passages, in context of the chapters they appear in, and within the broader context of the books they appear in, are definitely not suggestions that one should try to keep the Law in order to "live". Rather, they are a testament to God's justice, in that He would theoretically grant life to someone who kept His Law perfectly. We already know, however, from comparing Scripture with Scripture, that if such a thing had ever been possible, there was no point to Christ's death at all (Galatians 2:21).