You can help the Super Mario Wiki by expanding it. The rivals are determined by the current points standing, meaning that if Yoshi was still only second to the player, he will boost back to first position from the start.
It is possible to change the order if the rivals can't recover their place at the end (for example, if someone is playing as Luigi and Yoshi finishes last, Yoshi will then become one of the three slower drivers while everybody takes the next position up).
The rivals for each driver are always the same, the list below will be in that exact order for the first race. is Mario's rival, Mario will not be Donkey Kong Jr.'s rival, as shown in the table below. The rivals are also not determined in pairs, so that even if Donkey Kong Jr. If the human-controlled player tries to hit an opponent, said opponent jumps over the item a majority of the time. For this reason, the drivers (except the human racer) will (if unaffected) always finish in the exact same order. It is notable that when one of the three slowest drivers gets hit, that kart will keep its place, while when one of the faster cars gets shot, it will usually resume its previous place very quickly unless unable to catch up fast enough before the race ends. In Super Mario Kart, rivals contain one very fast driver, one fast driver, one medium driver, one slow driver and three very slow drivers.
In this case, though, Princess got a lower spot than normal. The rivals always finish in a particular order.