.
The following verses 5 to 15 from Chapter 3 in the book of “1 Kings” in the Old Testament, shows how Solomon obtained the three gifts from God: a listening heart, riches, and universal fame to rule over his subjects.
.

.
In Gibeon, the LORD appeared to Solomon in a dream at night.
God said: “Whatever you ask I shall give you.”
Solomon answered:
“You have shown great kindness to your servant, David my father because he walked before you with fidelity, justice, and an upright heart; and you have continued this great kindness toward him today, giving him a son to sit upon his throne.
Now, LORD, my God, you have made me, your servant, king to succeed David my father; but I am a mere youth, not knowing at all how to act.
I, your servant, among the people you have chosen, a people so vast that it cannot be numbered or counted.
Give your servant, therefore, a listening heart to judge your people and to distinguish between good and evil. For who is able to give judgment for this vast people of yours?”
The Lord was pleased by Solomon’s request. So God said to him:
“Because you asked for this—you did not ask for a long life for yourself, nor for riches, nor for the life of your enemies—but you asked for discernment to know what is right.
I now do as you request. I give you a heart so wise and discerning that there has never been anyone like you until now, nor after you will there be anyone to equal you.
In addition, I give you what you have not asked for: I give you such riches and glory that among kings there will be no one like you all your days.
And if you walk in my ways, keeping my statutes and commandments, as David your father did, I will give you a long life.”
Solomon awoke; it was a dream!
He went to Jerusalem, stood before the ark of the covenant of the Lord, sacrificed burnt offerings and communion offerings, and gave a feast for all his servants.
.
Note: I have used the United States Conference of Catholic Bishops (USCCB) version of the Holy Bible.