You did right
Even if I had quad-fifties mounted in my truck, I would have turned around and left. It's a can't win situation and even if technically justified in using deadly force to aid the guys who are down, you'll lose the tactical situation, the legal aftermath or both.
If you want a first-hand account of what happens when a mob sets upon you, go to crazyvideos.com for a sobering enlightenment. Use their search window.
Int'l Assoc. of Law Enforcement Firearms Instructors