David charges Solomon to walk in God's ways. He tells him of unfinished justice he couldn't bring. David dies - he was king for 40 years.
Adonijah asks (through Bathsheba) for the woman who attended David. He is still manipulating to get the throne. Solomon sees through it and executes him. He exiles the priest who supported Adonijah, and kills Joab at the altar. He confines Shimei (the guy who cursed David as he fled Absalom) to Jerusalem, and kills him when he violates it.
How this is about Jesus
His throne is established at the plan of His Father, and by His triumph over self-seeking rivals and subjects.
There are times to not show mercy, in order to rule your heart or house or a kingdom well.
Being soft on sin in your heart will trip you up in other parts of your life.
Being soft on the wicked is a cruelty to the rest of the family, or the nation.
It often takes a new generation, or a big change in circumstance, to move from tolerating sin as a group (family or nation or congregation) to eradicating it.