5,000 is a lot of calories. You were probably getting around 3,000 and him 2,000. Just an assumption.
5,000 calories was what we were told. We would routinely do 100 to 200 'squat thrusts' per infraction, several times each day. We once did 1,000 straight followed by 600 the next morning. In addition we had runs in combat boots.
I was in good shape before PI. I gained 16 lbs during boot camp - just muscle, no fat.
This calculator indicates a daily calorie burn of 3,950 plus factoring in weight gain of 16 lbs @ 3,500 cal/lb over the course of 13 weeks adds 650 cal/day. My estimated total would have been 4,600.
University of Arizona - Winning Edge: Nutrition for Fitness & Sport Workshop 2004