Context Word: encourage. 
Question: The man walked over to encourage PersonX but not PersonY because _ looked very sad and depressed. 
Answer: PersonX
The man walked over to encourage PersonX but not PersonY because _ looked very happy and optimistic.