1Ki 3:27-28, 27 So the king answered and said, “Give the first woman the living child, …she is his mother.”28 And all Israel heard of the judgment which the king had rendered; and they feared the king, for they saw that the wisdom of God was in him to administer justice.
God is for righteousness as He is also for justice. Righteousness deals with right standing, justice deals with fairness. Psa 89:14 declares that “Righteousness and justice are the foundation of Your throne; Mercy and truth go before Your face”. God loves fairness among His people. God came hard on Laban for unjustly treating Jacob.
The judgment of Solomon won the respect and confidence of the people. They saw the wisdom of God was in him to administer justice which saved and restored a life to its true mother. That was Solomon’s prayer in 1Ki 3:9 “Therefore give to Your servant an understanding heart to judge Your people, that I may discern between good and evil. …” This is what it means to pray for wisdom to try to get it right and be fair.
The just Judge of the world, one greater than Solomon will do what is right for the honor of His name. Psa 33:4-5, “4 For the word of the LORD is right, And all His work is done in truth. 5 He loves righteousness and justice; The earth is full of the goodness of the LORD.”