This is impressive! It would be easy to glaze over this verse and not give it a second thought. However, based on the previous verses, that in God's forbearance with the sinner, he left sins committed under the Old Testament unpunished, this verse gives us insight into how and why he did this.
God, operating under His own laws, did not wipe out mankind after sin corrupted His creation to start over from scratch. It would have gone against his character, his holiness and his righteousness. Because God is holy he cannot tolerate sin. His holiness required that he judge sin. The transgression and what it caused, created a barrier between us and God. So God's justice was demonstrated in the fact that he judged sin. But His mercy was demonstrated in the fact that he justified the sinner.
I heard a preacher use this example several years ago to illustrate this point and it has resonated with me ever since. Let's say you went before a judge of this land because you were guilty of an offense. The judge would have to pass down a sentence for that offense to fulfill their obligation to the law or standard of society. Upon finding you guilty, the judge could not dismiss the charge without punishment and still be acting on behalf of the judicial system.
However, after the he pronounced judgment, if the judge was to come down off the bench and offer the payment for the offense, he would be the justifier of the offender. He would be operating in accordance with the law, because he was just in passing down the sentence. But, he would also be operating in grace by taking the punishment or making restitution for the transgression.
So the judge is both fulfilling his obligation to the law in sentencing the offender and also showing mercy to the offender in making the necessary restitution to society for him. The same is true with God. He is both just, because he did not dismiss sin, he pronounced judgment upon it. And He is the justifier because he came down from Heaven and made the necessary recompense for the sin, through the blood of Jesus shed upon the cross. So He is both just and the justifier wrapped up in one... which is extraordinary!
Today, if you have put your faith in Jesus and what he accomplished for you on the cross, you have been fully justified in accordance with God's law. We know that He is both just and the justifier and that He operates in accordance to His Law. So no matter what comes our way, we can rest assured in Him and in the operation of His word.