The wicked is a ransom for the righteous,
and the traitor for the upright.
There is a sense in which the wicked receive the punishment that was to have been visited on others, including the righteous. Thus, Judah was spared when Sennacherib was moved by God to attack the Egyptians rather than his covenant people. And God could say,
"For I am the Lord your God,
the Holy One of Israel, your Savior.
I give Egypt as your ransom,
Cush and Seba in exchange for you.
Because you are precious in my eyes,
and honored, and I love you,
I give men in return for you,
peoples in exchange for your life" (Isaiah 43:3, 4).
One person cannot pay for the life of another, especially the life of a sinner for one who is righteous. But this type of language expresses the justice of God in which we often see the wicked meeting destruction of some sort and the righteous being spared. Thus comes the expression, "There but by the grace of God go I." And so will we say when the Day of Judgment comes and we are spared the judgment of God.
All the more then, ought we to tremble as we contemplate the real ransom made for us. For it was not by the substitute of the wicked that the righteous were ransomed; rather, it was by the substitute of the Righteous One that we the wicked were ransomed. Christ ought to have been spared the cross and we serve as his ransom. That would have been just.
What mysterious mercy is this that brought forth a profound justice in order to ransom wicked people?