When did they declare Shlomo king before this?
'Rashi': In Melachim I, 1:39, Tzadok took a horn [to anoint Shlomo]. Normally, we do not anoint a Melech Ben Melech; it was needed for Shlomo, to refute the supporters of Adoniyahu. Radak, Malbim - then, only people of Yerushalayim anointed him. Now David gathered Sarei Yisrael from all Shevatim and declared him king in front of them.
What is "Nagid"?
'Rashi': Negido 1 is the Targum of "Mishchu" (Shemos 12:21). This is like "Asher Yetzei Lifneihem v'Asher Yavo Lifneihem va'Asher Yotzi'em va'Asher Yevi'em" (Bamidbar 27:17).
Our text of Targum Onkelos is Isnegidu, and Targum Yonasan is Negudu. It refers to separation. (PF)
What is the meaning of "va'Yimshechu la'Shem l'Nagid"?
Radak, Malbim: It means va'Yimshechehu Oso la'Shem l'Nagid (they anointed Shlomo to Hashem, to be the leader), and anointed Tzadok to be Kohen Gadol.
Radak citing Sanhedrin 21a: This is an Asmachta that half the spoils that Yisrael take from their enemies are to the king, and half to the nation. The verse equates a Nagid to Tzadok (the Kohen Gadol). Just like Tzadok gets half, and half goes to his brothers, the Kohanim - "v'Hayah l'Aharon u'Vanav" (Vayikra 24:9), also the Nagid gets half and half is to the Am.
Why did he anoint Tzadok to be Kohen?
'Rashi', Malbim: It is because Evyasar anointed Adoniyahu 1 .
Rashi (Shmuel II, 15:24 citing Yuma 73b): It was because when David was fleeing Avshalom, Evyasar asked from the Urim v'Tumim, and was not answered. Radak (ibid.) - and Tzadok asked and was answered.


