:If the boys switch horses they will both race to the finish line thus not taking forever and the last horse that crosses wins.
One boy has to be smarter than the other one, since the challenge was "the boy whose HORSE crossed the finish line last", not the boy on the horse, whatever horse it might be. The smart boy oh the dumb boys horse would try to "win" on the wrong horse, while the dumb boy on the right horse would try to "lose" on the smart boy's horse.
When a salesman of mine went to New Orleans on a business trip, a little boy came up with a shoeshine box at the airport and asked if he could shine the salesman's shoes. The guy said no. The boy said, "I don't know you or where you are from (we were from San Diego), but I'll bet you five dollars I can tell you where you got your shoes. I'll even bet you I can tell you the city and the state where you got your shoes."
My salesman took the bet. And lost. How did the kid do it?
Farkel