Perhaps that person does have better problem skills, but who knows if someone also derived it faster within the time frame
Perhaps that person also makes a habit of not preparing & just winging it (Which is fine until it's not)
Perhaps that person also makes a habit of not preparing & just winging it (Which is fine until it's not)
The student who was most prepared would be able to derive proofs (by the process that was taught, like knowing to apply a theorom, or being comforatable with induction, etc) in a timely manner.
The exam is there to see how well you grasp the material taught, not how good at winging it you are (which is a very useful skill of course, but not the one being tested)