Context Word: nails. 
Question: PersonX grew their nails longer than PersonY, because _  had learned to distract herself from biting them.. 
Answer: PersonX
PersonX grew their nails longer than PersonY because _  had learned to distract herself by biting them.