As far as the allied NPC is concerned, I think you are correct. The other option is to simply increase the amount of XP by whatever he would take, and then still give them the same XP.
For the multi-fight combat, you can set up the scenario to make it less likely the NPCs will all gang up on the PCs. For their experience, you can give them the experience for NPCs they personally kill/knock unconcious, or ones they do a percentage of the damage to, or give a percentage of XP per NPC based on the percentage of damage they do (this last one requires a LOT of bookkeeping and math - just to be forewarned).
As for XP budget, I would definitely make it more than the standard encounter. How much more I think depends more on the set up than anything else. If it is likely that the PCs will only be fighting about half of each force at a time, make it double (or even more if you want to be really mean). Otherwise, you should budget it based on how many of the individuals you think are likely to focus on the PCs at any given time.
Hope that helps.
Short Version:
Maybe P is overwhelmed by bookkeeping and it's distracting him from situational awareness. Help him make a mechanically very simple character without fiddly bits or conditionals to keep track of, so he can focus on making good choices rather than having good bookkeeping. Invite the other players to support P with advice and by being good role models for the behaviour he's trying to cultivate.
Long form answer, with rambling and details.
Back in my very first RPG ever--and also my first time as a GM--I had a player whose poor choices got him repeatedly killed. Let's call him Q.
Q knew the rules and mechanics quite well, but had a very hard time applying them intelligently to whatever situation he found himself in (like forgetting to heal himself as a cleric). Even more than that, though, was his role-playing: he really really liked to role-play his characters, but that got him in trouble because when Q got deep into his character's internal motives the PC would lose common sense and perspective about the surrounding context of his actions.
It got bad. Really bad. Q's second character was killed by the party for betraying them (he had a conversation about his friends over tea with a "nice" lady). At that point I shared Making the Tough Decisions with the group. He studied it carefully, had intense discussions with me about it... and as a direct result his fourth character perished of untempered curiosity: the characterisation "very curious" overcame the common sense "half these items are cursed and my friends are begging me to stop," until the pile of treasure he was investigating yielded up a lethal curse.
After that session I took Q aside and we talked. He knew he had a problem, and he was trying to "get better," but he needed help. I'd noticed that all his PCs so far were mechanically complicated and required in-game bookkeeping: advanced casters and races with lots of conditional features and spell-like abilities to keep track of. So we hatched the simplest possible character build: nothing to keep track of. No "if you're flanking, X also happens," no spells, no per-day abilities. If his character sheet said he could do a thing, he could always do it.
We wound up with a kind of Indiana Jones flavoured skillmonkey (a rogue chassis with homebrew mods to replace things like sneak attack because tracking whether you can deal that extra damage was beyond what we wanted for the build). He wasn't optimised in the traditional sense--but since another PC in the party had straight levels in the NPC Expert class, that wasn't an issue in keeping him relevant in the group. Instead he was optimised for what Q needed: a simple no-bookkeeping character to let him focus on situational awareness and making good choices.
At the end of each session he'd hang back --along with any other players who wanted to-- and we'd reflect on the game: what worked, what didn't. We'd consult (and if necessary research) and come up with what to make sure we did again, and what we'd change next time. (I've since found that any game I run which has some form of this "reflect and plan" dynamic after every session is improved by it.)
In tandem with another player rising to the challenge and being a kind of "teach by example" role model, it worked. A year later Q was successfully running complicated wizard builds with great party dynamics and great depth of character. He was a real joy to work with, and all he needed was to wade in at the shallow end of the bookkeeping pool instead of jumping into the deepest part head-first.
nota bene: My players have tended to treat the group dynamic as one of table-level cooperation between friends. However much their characters may be rivals, at the table they collaborate to tell the best stories, and I'm also one of the collaborators. In groups where players and/or the GM act as rivals at the table level of things, I'm not sure how much my experience will be useful. It sounds like your whole group isn't really on the same page in terms of their desired gameplay experience, and communication isn't really strong. Working on improving the "friends at the table" level of things might help your game in a number of ways.
Best Answer
The rules as written for this, as taken from the DM DnD Basic Rules version 0.1 say:
It doesn't specify how much of the XP you should award, so it is reasonable to interpret it as meaning you may award any amount of XP you like, ranging from none at all to more than if they had fought them and won.
You could base your decision on the difficulty in avoiding them, or change the amount based on the behaviour you want to encourage (e.g. full XP if you like them finding ways around combat).