Context Word: migraines. 
Question: PersonX had more frequent migraines than PersonY, so _ had to take migraine medication frequently. 
Answer: PersonX
PersonX had more frequent migraines than PersonY, so _ had to take migraine medication rarely.