The guy said "How did that kid beat your test?" sarcastically.
They were watching Kirk the whole time - there's no way they would have missed the way he (didn't) react to the "system error" - and they way he was acting prior should have clued everyone in.
Spock was pissed that someone messed with his program.
Once the exact how and when was figured out, Kirk was called out at the assembly by Komack and Spock.