You all are missing a possible explanation.
The prince knew the solution the entire time. Merely wanted someone else to state it.
If you think about it, his knowledge that Mary is probably interfering and his inference that the blonde isn't actually coming up with the solutions would allow him to present a slightly complicated question that he figures she can answer, and give away. Challenge it, as he did last time, and bring up a complication that he hopes wasn't discussed (as he did last time).
When he finally catches the girl out, he can assert that it is Mary, and from it bestow it as her accomplishment and give her a title. His part only suggests that to him, this solution was something he could do at any point and the ENTIRE delegation was just beneath him to bother (or politically inconvenient to be directly involved in).