1 Kings 2:1 ASV

The first several verses of the chapter are David's last commands to Solomon. He starts by simply stating that he is going to die. The first thing David reminds his son to do is to "be strong, show yourself a man, and observe what the Lord your God requires..." (v2,3) He goes into detail about what the Lord requires. He says that if he does this, he will prosper in all he does and wherever he goes. (Reference Joshua 1:8- "...then you will be prosperous and successful").
Next, David gives his son some specific commands, some people that he must deal with. He talks about Joab's betrayal. He says to show kindness to the sons of Barzillai of Gilead. David warns of Shimei the Benjamite. Then is says that David was laid to rest with his fathers in the City of David (after his 40 year reign).

Starting in verse 13, Solomon starts "cleaning house." The first thing that happens is Adonijah comes to Bathsheba and asks her to have Solomon let him wed Abishag the Shunammite. (IF ANYONE KNOWS WHY THIS IS SO IMPORTANT, PLEASE LET ME KNOW). This request didnt set well with Solomon, and he ordered that Adonijah be put to death.
Evidently, Benaiah son of Jehoiada was elected to do all the king's dirty work (as you see later), and was sent to kill Adonijah... as he did. Solomon did not have the priest Abiathar killed. Instead he sent him away and removed him from the priesthood. He did this because Abiathar had carried the Ark and had shared in the hardships of David.
Now, when Joab heard what had happened, he became frightened because he had conspired with Adonijah. So he fled to the tent of the Lord and held onto the horns of the altar (AGAIN, IF ANYONE KNOW THE SIGNIFICANCE OF THIS, LET ME KNOW). Once again, Benaiah is given the job of killing. He goes to the tent and kills Joab and buries him out in the desert. (Joab was killed because he had killed Abner commander of Israel's army, and Amasa commander of Judah's army.)
Solomon put Benaiah over the army, Zadok in the place of the priest Abiathar. He sent for Shimei and told him to build a house in Jerusalem and not leave or he would die. Shimei agreed and swore not to leave. But two years later, Shimei left to chase after two slaves. When he returned, and Solomon found out about it, he had him put to death (of course by Benaiah).

1. David's final words- obey the Law
2. David's final words- take care of these men:
3. Solomon cleans house
4. Solomon rewards those who have been faithful to him.
5. Solomon tries to have mercy on Shimei, but Shimei does not keep his oath, so he is put to death

David's final words speak to his character. Obey the Law. In what could have been his last breath, he said this to his son. Since it wasn't his last breath, he went on. But he said what was most important first.
Solomon prepared his house for his future reign, ridding himself of those who would not help him prosper. He replaced them with men who had proved themselves honorable and trustworthy.
Finally, Solomon tries to have mercy, but Shimei does not keep his oath, and therefore is punished with death.