2 Samuel 10:18
18 And the Syrians fled before Israel; and David slew the men of seven hundred chariots of the Syrians, and forty thousand horsemen, and smote Shobach the captain of their host, who died there.
1 Chronicles 19:18
18 But the Syrians fled before Israel; and David slew of the Syrians seven thousand men which fought in chariots, and forty thousand footmen, and killed Shophach the captain of the host.
Did David slay 700 or 7,000 chariot men? Did he slay 40,000 horsemen, or 40,000 footmen?
Note that the account in 2 Samuel says that David slew the men of 700 chariots, whereas the account in 1 Chronicles says he slew seven thousand men which fought in chariots. That equates to 10 men per chariot, on average (including substitutions, and possibly men trained as charioteers).
Alternatively, we can recognize that if 7,000 chariot men were slain, it's also true that 700 were slain, and one account is simply being less precise.
The account in 2 Samuel says that David slew 40,000 horsemen, whereas the account in 1 Chronicles says that he slew 40,000 footmen. This shows that the classification of "footmen" or "horsemen" was arbitrary in this case. The soldiers were such that they could be classified as either one. It's also possible that he killed both 40,000 footmen, and 40,000 horsemen, and we are just getting different details from different authors.