I've done a few combats recently where the PCs and their enemies were not the only participants in the fight. I wasn't sure how to budget XP in this case.
In the case of an NPC ally I see two options. Draw the NPC up as a PC and increase the number of members in the party. Or draw the NPC up as an NPC and take its XP into account when budgeting. I'm not sure if either option is correct.
What about if there's more than one side in the fight and nobody wants to team up? I'd rather not treat it as one combat budget divided over two factions. Unless the factions immediately unite, it's going to be an absurdly easy combat. Would I be better off budgeting for two encounters than happen at the same time, and hoping that no PC gets ganged up on too much?