Some really good answers in this thread, and some not so good ones as well.
Rule: Always engage the nearest enemy first.
Why?
You would have to get past him to get to the lead bandit anyway. Besides, even if you don't score heavily, he will break turn (unless he's an idiot). Either way, he's out of the fight for the time being.
Last week this same scenario presented itself. I was flying a P-51D, and had expended most of my ammo on a pair of B-17s and an earlier Spitfire. On my way to rearm, I spot a friendly Tiffie being pursued by a couple of F4Us (turned out to be F4U-4s). I'm at 8k and these guys are down near the deck. I only have ammo remaining in two inner-most guns, but enough to be a threat. I unload and head down behind the nearest f4U. Between 600 and 800 yards, I fire scoring some hits. This guys breaks hard right. I blow by at 450 mph.
I close on the other Corsair. I open fire at about the same range, again scoring some hits. This one is a bit stubborn and it takes a second short burst to convince him to evade. He also breaks hard right. I take the Mustang vertical, zooming up about 2k above the -4s and then spiral down, dropping in on one of them. He runs, doing aileron rolls. I fired the last of my ammo, taking off a flap and getting his oil. I call Winchester on the radio, angle left, unload and accelerate away while the second F4U does the old spray and pray at me from 1k out. Meanwhile, the fleeing Typhoon has reversed and he clobbers the F4U-4 that was shooting at me. I got an assist. About two minutes later, I get a second assist. If I had a fully battery of guns, both of these guys would have gone down. As it was, I was satisfied to help a teammate.
Always attack the nearest enemy.... As Dedalos pointed out, you can work your way forward, especially if the rear most is shot down or doesn't think to warn the leader.
My regards,
Widewing