Once the person being brought in in the ambulance is through triage and stable (or DOA, whichever come first), then treat the cannon fodder.
It's like a similar but different version of the Trolly Problem. If there's a t-bone collision at an intersection and both drivers are injured, should you treat the one with the worse injuries first or the one that was going through the intersection on the green and injured by no fault of their own?
Interesting scenario. My knee jerk would say treat the innocent party first but triage isn't supposed to be judgmental. What if there were extenuating circumstances? Both could be dead by the time an accurate conclusion was reached.