Context Word: dog. 
Question: So _ brought the dog because PersonX wanted a pet and PersonY needed to get rid of one. 
Answer: PersonX
So _ sold the dog because PersonX wanted a pet and PersonY needed to get rid of one.