Build or factory rifle?
If possible, component list?
Low profile gas block or A2 post?
Gas system length?
What specific factory ammo and what was the powder he was loading with?
It sound like its not getting enough pressure in the gas system to completely cycle but if its only on the last round, the magazine could have something to do with it too. Ive seen mags cause so much drag that the reduce bolt velocity dramatically on the last round fired.
A Good cleaning and inspection of the bolt and carrier would be a start.
As stated, the gas block has to be in perfect or near perfect alignment with the port in the barrel, if it is not aligned, you will probably see a lot of soot and carbon around the block where it bled off. The block could also be too far forward or too far rearward causing misalignment.
I ran into a inconsistent cycling issue with my 18" rifle length SPR barrel. Turns out that when I installed the gas block, I ASSUMED that it was machined to have the gas block butted up with the barrel journal since that barrel likely would have a free float handguard. This wasnt the case. I had to have a fingernails thickness between the gas block and the shoulder of the journal to account for a handguard cap with the gas block and it has run everything since.