Context Word: mathematical rules. 
Question: PersonX but not PersonY failed the trigonometry class because _ did not understand the mathematical rules of formulas. 
Answer: PersonX
PersonX but not PersonY failed the trigonometry class because _ did understand the mathematical rules of formulas.