The principal appears to be anti-that faction (and have a ton of sway), so I would argue that it's more likely they would overlook mc but not the prince.
Yeah, I was a bit confused by that too. But I imagine the math teacher didn't grade the students and just gave it 98-100 points, giving them a throughput that let them cover the entire rose group (and for some reason no principal or politically antagonistic teacher called him out on it?).
I was going to refute that entire paragraph with this, but seems you realized it yourself. This is elementary education, and all teachers has already gone through it themselves. And surely they are not solely reliant on a singular teacher - what if he falls ill or worse? Must exists someone available to be a substitute, so can use him (or just use the principal herself, argue it is for "fairness" so noone frames the rose faction).
Really wasn't, in-universe.
Top: the principal, yes. But it is still the next monarch and one (or more) of the top Noble's of the country. I don't care what power the principal may or may not have over the school, it likely pales in comparison with the combined political power of the Rose group.
Literally, unless the King/Queen gave her equal authority, her hands are tied with regards to outright declaring foul. And navigating the intricacies of countering one cheating accusation with "well, we will check everything and everyone then" is more difficult than the end result that was chosen.
Second: but there is the problem. The math teacher wasn't the only teacher grading the math tests (which is what made me realize that my next point was wrong). Unless she demanded all of the tests for the group she favors, someone else (who could also favor that group, but for each member to each teacher this becomes less likely) had to grade some of their tests. If she demanded all of the tests for one group and no one called foul... That would be an even bigger problem.
Third: my point was proven wrong because it shows all the teachers graded each test each time. Unless they were each given a "key" to the tests, which would only work for multiple choice questions and (obviously) math, but not critical thinking literature (but, given the example questions, those could have been on a grading "key" sheet as well). Anyway, this point is basically meaningless so I will drop it.
Finally: honestly, even in-universe it could have been inevitable. This depends on multiple factors, really, so it is hard to tell. Easiest factor to boil down is that if the other group lost they would have accused our group of cheating and made enough of a fuss that it either would have nullified the contest, changed the contest to something else (in their favor) or resulted in a duel... which, I believe, the principal predicted, planned for, and decided on. If true, the (likely) best result is from a duel, so she would push for that. This means that unless the other group won outright, a duel was effectively the foregone conclusions.
But, still, I am making assumptions here, and therefore could easily be wrong.