It's not my job to sort our God's ways and decrees.
He can claim to be unjust to some and unmerciful to others. Or He can choose to be both just and merciful. It is His choice.
Rom 3 tells us what choice he took.
21 But now apart from the Law
the righteousness of God has been revealed, being witnessed by the Law and the Prophets, 22 but
it is the righteousness of God through faith in Jesus Christ for all those who believe; for there is no distinction, 23 for all have sinned and fall short of the glory of God, 24 being justified as a gift by His grace through the redemption which is in Christ Jesus, 25 whom God displayed publicly as a propitiation in His blood through faith.
This was to demonstrate His righteousness, because in God’s
merciful restraint He let the sins previously committed go unpunished; 26 for the demonstration,
that is, of His righteousness at the present time,
so that He would be just and the justifier of the one who has faith in Jesus.
Rom 9:
22 What if God, although willing to demonstrate His wrath and to make His power known,
endured with great patience objects of wrath prepared for destruction? 23 And
He did so to make known the riches of His glory upon objects of mercy, which He prepared beforehand for glory, 24
namely us, whom He also called, not only from among Jews, but also from among Gentiles,
Rom 2
4 Or despisest thou the riches of his
goodness and forbearance and longsuffering; not knowing that
the goodness of God leadeth thee to repentance?