First, let us recall that in Galatians 3:11, Paul says: "It is evident that no one is justified before God by the law, for “The righteous shall live by faith.”" I'll be honest, there is nothing obvious about how this brief phrase from Habakkuk evidently proves faith justifies while the law does not justify. I'm sure that if other folks were honest, they would admit this phrase is more mysterious than it is clear. Most commentaries that I have come across take the very simplistic approach of saying something akin to "Habakkuk says faith gives life, so that's all there is to salvation." Sorry, but I think that's an immature approach to the text, and is full of problems. For one, we already noted in Part 2 that "faith" in Hab 2:4 is more accurately translated/understood as "faithfulness," and nothing in the text or context suggest a person is incapable of doing good works or that everyone is unrighteous (e.g. God did not consider Habakkuk as unrighteous). And the way Hab2:4 is quoted in Hebrews 10:32-39, "you have need of endurance, so that when you have done the will of God you may receive what is promised," there is nothing in Paul's lesson here that in any way suggests faith alone or "once saved always saved". (Protestants have shamefully and intentionally avoided the rule of "Scriptures interprets Scripture" by refusing to take Hebrews 10:38 into consideration when interpreting Romans 1:17 and Galatians 3:11.)
On top of that, there are many texts in the Bible that link having life, righteousness, etc, to obeying God's commandments, e.g., Proverbs 4:4; 7:2; 11:19; Eze 18:22; as well as very relevant passages similar in nature to Habakkuk, such as Ezekiel 14:12-14,
And the word of the Lord came to me: “When a land sins against me by acting faithlessly, and I stretch out my hand against it and break it, and send famine, and cut off from it man and beast, even if these three men, Noah, Daniel, and Job, were in it, they would deliver only their own lives by their righteousness, declares the Lord God.
To begin finding a satisfying answer, I think we should consider the key phrases which Paul uses when he appeals to Hab 2:4. First, as noted above in Galatians 3:11, Paul says Hab 2:4 somehow demonstrates that 'works of the law do not justify'. Second, in Romans 1:17, Paul says Hab 2:4 somehow demonstrates that 'the righteousness of God is revealed'. I think the answer that addresses both is a proof text along the lines of showing the Mosaic Law was broken and thus put the Israelites in a hopeless condition, yet which nonetheless God promises to rescue/save His people. The book Habakkuk was written to address the national punishment coming upon Judah for its unfaithfulness to the Mosaic Covenant, which did not contain any provision for atonement of major sins. Yet, despite providing no means of un-breaking the Mosaic Law, somehow throughout the OT prophets we are told God promises to rescue His people. This can only mean the Works of the Law do not justify (in the sense of saving a person from their sins and giving them spiritual life or even heaven). It also means that God's Righteousness, that is His promises to correct the issue of sin and bring about salvation, is promised in the prophets to come about in His due time by some other basis than the Law. Thus, when Paul brings up Habakkuk 2:4 to his Jewish opponents, they are reminded of their national disobedience to the Mosaic Law, requiring punishment since the Law does not allow them a second chance, while at the same time promising them a second chance at living through some other merciful provision apart from the Works of the Law. This "other merciful provision" is only revealed at the time of the Apostles, wherein Jesus arrives to deal with sin, and this message is known simply as the Gospel.
It is also possible that Paul was saying that Habakkuk was speaking of a time when it wasn't even possible to practice the Mosaic Law since the Israelites were now in exile and thus couldn't even live out the works of the Law due to living under pagans. Both then and in 70AD, the Temple was destroyed, meaning the Israelites couldn't even carry out their routine Levitical duties regarding sacrifices, purification, holidays, etc. Thus, they must live some other way than by the Law if they want to continue their religion and relationship with God, and that way must be common to both Gentiles and Jews (e.g. not restricted to the geographic land of Jerusalem). Within the context of Christianity, we are also living among the pagans, namely those outside forces that are constantly trying to persecute us, which we must suffer for now and persevere in faithfulness to God.
Greek Habakkuk: (3a) For the vision is yet for a time, and it shall shoot forth at the end, and not in vain: (3b) though he should tarry, wait for him; for he will surely come, and will not tarry. (4a) If he should draw back, my soul has no pleasure in him: (4b) but the just shall live by my faith.
Hebrew Habakkuk: (3a) For still the vision awaits its appointed time; it hastens to the end, it will not lie. (3b) If it seems slow, wait for it; it will surely come; it will not delay. (4a) Behold, his soul is puffed up; it is not upright within him, (4b) but the righteous shall live by his faith.
Hebrews 10: 19 We have confidence to enter the holy places by the blood of Jesus, 20 by the new and living way that he opened for us through the curtain, that is, through his flesh, 21 and since we have a great priest over the house of God, 22 let us draw near with a true heart in full assurance of faith, with our hearts sprinkled clean from an evil conscience and our bodies washed with pure water. 23 Let us hold fast the confession of our hope without wavering, for he who promised is faithful. 24 And let us consider how to stir up one another to love and good works, 25 not neglecting to meet together, as is the habit of some, but encouraging one another, and all the more as you see the Day drawing near.
26 For if we go on sinning deliberately after receiving the knowledge of the truth, there no longer remains a sacrifice for sins, 27 but a fearful expectation of judgment, and a fury of fire that will consume the adversaries. 28 Anyone who has set aside the law of Moses dies without mercy on the evidence of two or three witnesses. 29 How much worse punishment, do you think, will be deserved by the one who has trampled underfoot the Son of God, and has profaned the blood of the covenant by which he was sanctified, and has outraged the Spirit of grace? 30 For we know him who said, “Vengeance is mine; I will repay.” And again, “The Lord will judge his people.” 31 It is a fearful thing to fall into the hands of the living God.
32 But recall the former days when, after you were enlightened, you endured a hard struggle with sufferings, 33 sometimes being publicly exposed to reproach and affliction. 34 For you had compassion on those in prison, and you joyfully accepted the plundering of your property, since you knew that you yourselves had a better possession and an abiding one. 35 Therefore do not throw away your confidence, which has a great reward. 36 For you have need of endurance, so that when you have done the will of God you may receive what is promised. 37 For [as Habakkuk says],
“Yet a little while, and the Coming One will come and will not delay;
38 but my righteous one shall live by faith,
and if he shrinks back, my soul has no pleasure in him.”
39 But we are not of those who shrink back and are destroyed, but of those who have faith and preserve their souls. 11:1 Now faith is the assurance of things hoped for, the conviction of things not seen. 2 For by it the people of old received their commendation.
Paul was thus quoting Habakkuk as a prophecy of Jesus' Second Coming (or at least the judgment in AD70, or both), while we are in a time of exile, and the Mosaic Law has expired, leaving us to live by new Covenant rules and regulations. This applies to the Jew and Gentile alike, and thus "from faith to faith" means there is an analogy of our conditions found in the lesson of the OT conditions of Habakkuk and the Babylonian Exile. To me, this is a far more satisfying explanation of Paul's proof text than a mere surface level reading of a few words.