The Racetrack is quite a fun minigame. You have
to direct Efreet around the track 5 times in order to finish the
minigame. The faster you do it, the better prize you get. In
order to start the race, you have to direct Efreet into the
starting gate to the right of the campfire (on the left side of
the screen).
The best way to win this is to use the Fireball
Attack. This will allow Efreet to charge ahead, but only in the
direction that Ali is facing. Have him keep doing that all the
way around five times. After a bit of practice, you should be
able to get the Infinite Fire Bow and the Red Gem. Remember that
you can only win each prize once.