Why did he say "v'Gam"?
Radak: This includes Mitzvos Hashem, to go in Hashem's ways. Also this is Hashem's way, to eradicate evildoers.
Malbim: This refers to "v'Asisa k'Chachmasecha" (verse 6). Even though you should not rely on your Chachmah to deviate from Moshe's Torah, there are matters for which you should use your Chachmah to use a king's power to kill unlike Torah law for the sake of a fence, e.g. killing Yo'av. David did not kill him in his lifetime, for he needed him; no one else was proper to lead the army. 1
Shlomo will not need this, for Hashem promised that he will have serenity (Divrei ha'Yamim 1 22:8-9). David already knew this; so Nasan explained why David cannot build the Beis ha'Mikdash, but Shlomo can (Malbim 5:17, Shmuel II, 7:13).
Why did he say "Atah Yadata"?
Radak: You know what Yo'av did to me. You know like I know; I need not inform you.
What did Yo'av do to David?
Rashi citing Tanchuma Mas'ei 12: He showed the letter that David sent with Uriyah ha'Chiti [saying how Yo'av should arrange that Uriyah die].
Radak: He killed two head generals. What he did to them was to me, for I promised Avner and received him with love. Also Amasa was doing my mission, and bringing Anshei Yehudah to me.
Radak: Some say, he killed Avshalom 1 . According to this, the prefix Vov is missing from "Asher".
Malbim: It was some sin against David that David and Shlomo knew.
Avshalom wanted to kill David! Why should Shlomo kill Yo'av for killing a Rodef? Avshalom was caught by his hair (Shmuel II, 18:9). Yo'av could have captured him and quelled the rebellion without killing him. (PF)
Was Amasa Sar Tzeva?
Radak: Avshalom made him his head general, and David intended to make him the head general, and he was the head general of Yehudah, and he veered the hearts of Yehudah [to follow David] like one.
Why did he say "va'Yasem Demei Milchamah b'Shalom"?
Radak #1: They were at peace with him, and he killed them, as if they were at war with him.
Radak #2: The blood of [Yo'av's brother] Asah'el, which was Demei Milchamah, for he was pursuing Avner to kill him, he treated it like b'Shalom - he avenged it and killed him. Also Amasa, he was b'Shalom with him and had no reason to kill him.
Radak citing Targum Yonasan: [He killed them] with his cunning. He considered that their blood will be like blood of those stricken in war, and he sat in ambush of them with the appearance of Shalom.
Malbim: Both Avner and Amasa initially fought against David (when they were with Sha'ul and Avshalom, respectively); then, Yo'av had a Heter to kill them. He killed them only after they made Shalom with David! This destroys the kingship and etiquette of countries, to kill generals who make a Bris after the war ends! And it seemed [to people] that he did so via David's command.
Why did he say "with the belt in his loins"?
Rashi: When he went to greet Amasa, he girded his sword close to his loins, unlike the norm, with the mouth facing down, so it would fall. When it fell, he took it, and Amasa thought that he is merely picking it up, and he did not guard himself from Yo'av.
Why does it say "uv'Na'alo Asher b'Raglav"?
Rashi: He killed Avner through guile. Yo'av asked him how a Gidemes (a woman without hands) does Chalitzah - "va'Yatehu Yo'av El Toch ha'Sha'ar Ledaber Ito ba'Sheli" (Shmuel II, 3:27. Radak - Avner bent down to demonstrate - with her teeth. Yo'av drew his sword and killed him.) B'Sheli [refers to removing,] like "Shal Na'alecha" (Shemos 3:5).
Radak: They fell dead l'Raglav (after [encountering] him).