The righteous Paul wrote of in 1 Tim 1:9 are those justified and transformed by the gospel of Christ. Some may be taken back by Paul's use of the word "righteous" because of Romans 3:10. But in light of Paul's other teachings in Romans, and how Christ's righteousness becomes the believer's by imputation, it's not difficult to understand a child of God who has been reckoned/declared righteous being referred to as righteous.
Of course when Abel is called righteous in Matthew 23:35, we understand it was a righteousness reckoned to him by God and not a result of his good works.
so that on you will come all the righteous blood shed on earth, from the blood of righteous Abel to the blood of Zechariah son of Barachiah, whom you murdered between the temple and the altar. (Matt 23:35 NET)
In 1 Tim 1:8 Paul wrote:
1Ti 1:8 But we know that the law is good, if a man use it lawfully;
I prefer the NIV's rendering of this verse because it avoids confusion: We know that the law is good if one uses it properly.
The law's proper use, as Paul expounded on in Romans and Galatians, would lead man to Christ because of our inability to properly follows the law's commands (something the listed transgressors of verses 9 and 10 should take heed to). That's why Paul spends some time rebuking those who considered themselves teachers of the law (verse 5,6) when they knew not its proper use and as a result became vain talkers.