Context Word: problem. 
Question: After PersonX solved the difficult math problem, he showed PersonY the solution. _ was proud of himself. 
Answer: PersonX
After PersonX solved the difficult math problem, he showed PersonY the solution. _ was proud of him.