Context Word: pet. 
Question: PersonX needed to buy a dog bed for their pet while PersonY did not because _ had just got their first puppy. 
Answer: PersonX
PersonX needed to buy a dog bed for their pet while PersonY did not because _ had just bought one earlier.