Did he kill them via Gedalyah?!
Rashi (from Nidah 61a): Because Gedalyah should have been concerned for Yochanan ben Kare'ach's counsel (that Yishmael wanted to kill him), and he was not concerned, the verse attributes their death to him.
Radak #1: Yishmael came to Mitzpah to kill Gedalyah. Since he killed him, he killed also those with him, and those going to see him. Also "ha'Yad Yo'av Itach" (Shmuel II, 14:19) is his idea; did he arrange the matter?
Radak #2: It is in the place where Gedalyah was, in Mitzpah. Also "v'Yad Tihyeh Lecha" (Devarim 23:13) is a place.
Malbim: Yishmael said that Gedalyah commanded to kill them.
Where do we find that Asa made a pit due to Basha?
Radak: It is mentioned only here. Targum Yonasan says that Asa made a pit when Basha besieged him.
Malbim: This teaches the consequence of sin! Basha built Ramah, so people would not go to Asa (Melachim I, 16:17), i.e. to ascend for the Regel. The primary ascent for the Regel was via Mitzpah - "Ki Pach Heyisem l'Mitzpah" (Hoshe'a 5:1). Asa's troops stood there to protect Olei Regalim and fight Basha's troops. He made the pit to supply water for his army. This pit, which was made to help people going to Beis Hashem, through the generation's sin, in it were cast bodies of those going to Beis Hashem!