What does it mean "David made a name"?
Rashi: He buried those that he killed from Edom, like it says "va'Yhi bi'Hyos David Es Edom
Here it says 18,000. Verse 5 says 22,000!
Radak: Here was in Gei Melach. Verse 5 discusses a different place.
According to the Midrash (refer to 8:13:3:3), here it mentions killing 18,000 of Edom. Verse 5 says 22,000 of Aram. (PF)
Here it says that David killed 18,000 from Aram in Gei Melach. In Tehilim (60:2), it says that Yo'av killed 12,000 of Edom there, and in Divrei ha'Yamim I, 18:12 it says that Avishai killed 18,000 of Edom there!
Rashi (from Bereishis Rabah 74:15): We must say that here and in Tehilim discuss different wars.
Radak, Rashi (Tehilim 60:2): The war with Edom was at the time of the war with Aram, like it says (Tehilim 60:2) "b'Hatzoso Es Aram Naharayim v'Es Aram Tzovah