Page 9:
"Well, if you apply it officially, the problem is..."
This is clearly a math problem being discussed in the classroom, which you know because Yamamoto replies with a number when called on by the teacher.
公式に doesn't mean "officially" here as an adverb, 公式 is a noun, and the に followed...