The question is: Why was Solomon given two God given names and what do we students of the Word learn from these names?
2 Samuel 12:24-25
And David comforted Bathsheba his wife, and went in to her and lay with her and she bare a son, and he called his name Solomon: and the LORD loved him.25) And he sent by the hand of Nathan the prophet; and he called his name Jedidiah, because of the LORD.
First we must consider the event and context associated here. David has committed what most would consider his worst sin. He has committed adultery with Bathsheba and then gave the order that resulted in Uriah's death, husband of Bathsheba. God has sent Nathan to convict David of his sin and pronounce sentence on David from God. David's own household shall raise up evil against him in the future and his wives will be taken from him publicly. David acknowledges his sin, but Nathan in 2nd Samuel 12:13 tells David his deed (sin) has given the enemies of the LORD great occasion to blaspheme. The LORD puts away David's sin and will not kill him, but the child shall surely die.
So given the context of this situation, there are some important parallels to consider. A child that has committed no sin has been required to die, not for his sin, but for his father's sin. Ezekiel 18:20 has not yet been decreed, so the sins of the father is visited on the child. An atonement has been provided but a severe price had to be paid by David and Bathsheba.
Now enter the OP question: Solomon is born and his God given name which means "peaceable and perfect" is declared. The peaceable is significant in that David has repented and been chastised. His relationship with God has been restored to peace but a severe price had to be paid.
Now let us address the dispatching of Nathan to the new child to declare a second or prophetic name. The name Jedidiah, which means "Beloved of the LORD". God would go on to bless Solomon with wisdom and wealth beyond measure and peace would be gifted to his kingdom.
Conclusion: One thousand years before Christ would be born and die, an example of how sin requires the shedding of blood or death of an innocent life. Even with a man after God's own heart or the son of that man who is given great wisdom an wealth and blessing of God, man proved himself to yet be a sinner and great ones at that. God's word is sharper than a two edge sword. It is not authored to be confusing. It must not be considered to be open to man's private interpretation, but it does take a diligent study and understanding of the Holy Spirit guidance to strive toward a perfect (complete) understanding. It would be proud to think we ever get there in this world. Finally, how can we fully understand and appreciate the greatness of Jesus and the New Testament until we see the failures of the old testament's greatest heroes. A new name from God becomes your destiny. I hope you have one.