In verses 6 through 22 we have David's charge to Abishai to pursue after Sheba. David told Abishai that Sheba would do them more harm than Absalom did (v. 6).
The men of Joab went out after Abishai, along with the Cherethites, the Pelethites, and all the mighty men, to pursue after Sheba (v. 7).
Verses 8 through 13 speak of Joab's killing of Amasa. Amasa came to meet Joab and his followers, and Joab struck Amasa in his stomach with a sword and poured out his bowels onto the ground (vv. 8-10a). Then all the people turned to follow Joab and his brother Abishai to pursue after Sheba the rebel (vv. 10b-13).
Sheba went on throughout all the tribes of Israel, and the people gathered together and went after him (v. 14).
Joab went to besiege Sheba at Abel of Beth-maacah, casting up a siege mound against the city (v 15). A wise woman offered to Joab a way to kill Sheba, and Sheba was slain (vv. 16-22a). Joab then blew the trumpet to disperse the people from the city and returned to Jerusalem to David the king (v. 22b).
Verses 23 through 26 describe the re-establishment of the kingdom of David. Joab ruled over all the army of Israel (v. 23a); Benaiah the son of Jehoiada ruled over the Cherethites and the Pelethites (v. 23b); and Adoram ruled over the forced labor (v. 24a). Jehoshaphat the son of Ahilud was the recorder (v. 24b); Sheva was the scribe (v. 25a); Zadok and Abiathar were the high priests (v. 25b); and Ira the Jairite was an adviser to David (v. 26).