I found a gem on justification, written by J.I. Packer, that can be found here:
Let me quote from it:
God’s justifying judgment seems strange, for pronouncing sinners righteous may appear to be precisely the unjust action on the judge’s part that God’s own law forbade (Deut. 25:1; Prov. 17:15). Yet it is in fact a just judgment, for its basis is the righteousness of Jesus Christ who as “the last Adam” (1 Cor. 15:45), our representative head acting on our behalf, obeyed the law that bound us and endured the retribution for lawlessness that was our due and so (to use a medieval technical term) “merited” our justification. So we are justified justly, on the basis of justice done (Rom. 3:25-26) and Christ’s righteousness reckoned to our account (Rom. 5:18-19).
The argument, in summary, is this: If God is just, how can He declare someone that is sinful to be righteous? Answer: Because the righteousness that God sees when he looks at the elect sinner is the righteousness of Christ. In other words, God does not nilly willy and “in a vacuum” declare something sinful to be holy. That would indeed be an unjust declaration. However, if in Christ we are righteous, because He is our “Adam,” that is, our spiritual representative and head, then it would be unjust for God to NOT declare us justified. See the logic there? According to God’s own consistency, since Jesus is our righteousness, God justifies the elect.
The justifying action of God is not an exception to his otherwise perfect justice. On the contrary, the action is an application of God’s perfect justice. This is the magnificence of the cross. The cross verified and guaranteed the justifying salvation to all who were of the elect sons and daughters of Christ, the new and perfect Adam.