The most important thing to keep in mind is that neither the mage nor the necromancer will want to let the other get the upper hand. If they each view each other as more of a threat than the party, they will try to eliminate each other first. Basically, the only reason they should ever appear to "team up" is if they fear that they are both equally powerful, but much weaker than the party. In active fights against multiple enemies, most participants will try and eliminate the biggest threat. Taking out the weakest first is only a viable strategy when the stronger guys aren't bearing down on you.
If it appears to be an all-around equal fight, (party vs. mage vs. necromancer,) then I would suggest trying to get the party to split up to take on each NPC. Since they are both casters, they should be preoccupied holding off the PCs immediately in front of them, but occasionally send some sort of area-affect spell towards the other fight, engulfing both other party members and their opposing NPC.
Also, since they are both casters, make good use of summoned monsters. This way, they can each have a physical presence in any smaller fights that may break out. Perhaps each NPC could summon a monster to protect their own flank, and a monster to attack the other NPC. The fight would look like this, then: An NPC fighting along side their summoned monster against half the PCs and the other NPC's monster, and a mirror fight on the other side.
Another option is to try and use the PCs as weapons of the NPCs, if the NPCs are powerful enough. Use compulsion effects to turn the PCs against each other (more difficult) or persuade them to change their attacks from one NPC to another (easier to do). Don't over do this, as PCs don't like being told what to do, but keep it in mind as a way to swing the balance of the fight.
Lastly, I would suggest making the PCs think that they could not take out one of the NPCs by themselves (even if this may not be true.) If they think they could, they will be more likely to focus on one NPC, and while it may be an efficient tactic, it will ruin the feel of the 1v1v1 fight.