It's a low level magic trick: she chose the problem. Even supposing she didn't have the answer memorized, she knew exactly what to min/max to favor herself in the challenge.
(A real magician would also work to make sure that the kids thought they chose the problem, but the choice had already been primed for them.)