You can find the three fastest cadets in seven races.
The first five are spent racing all the cadets once each, five at a time. Keep the top three finishers for each race and eliminate the bottom two, since a pony who came fourth or below can't be the THIRD-fastest. That eliminates ten possible cadets.
Next, run a sixth race, composed of the winners of each previous race. Whoever wins this one is the fastest cadet, so you can safely put that cadet to one side. Keep the second and third place finishers and eliminate the bottom two.
This is the part that Spitfire mentioned: some of these cadets will already have proven to be unable to make top three overall, and are going to be dropped. Next, go through everypony who lost to whoever came third, fourth and fifth in the second heat during their first heats and eliminate them. That leaves only six cadets in the running.
One other cadet can also be eliminated: whoever raced the pony who came second during the second heat, but came third during that first heat, since you now know at least three other ponies faster than that cadet. So you're left with only five ponies.
Finally, have them race, and whoever makes it to the top two are your second and third-fastest cadets.
Uh... This seems flawed. Suppose, after five races we have five threesomes. If the fastest of each threesome raced, would you really be sure you'd select the right ones for the next race? Could we conduct just one race with all 25 participants, we'd be able to tell for sure, but, since several races are conducted, chances are, a loser could become a winner.
9475155
No, that's just you not reading the solution properly. Nopony is made to race again if they are clearly not cut out for it.