You must pass each of the 10 checkpoint balloons in order to finish the race. They can be done in any order to finish, but a shorter path is going to save substantial amounts of time. The course is marked by hanging ropes throughout, and following the course will keep you competitive, but it can be tough to win without deviating from it. Yes, I know that this is inviting a bunch of "Neener-neener, you fail because you didn't win it by following the course" replies, but honestly, it takes some lucky cloud rings right at the beginning to get your speed up without having to travel everywhere.
Passing through a cloud ring gives you a stack of a buff that increases your speed by 10%. It stacks 10 times. Getting the speed buff up to 10 quickly and keeping it at 10 for the duration of the race is pretty much necessary to win. It's possible that you'll wind up getting really bad cloud spawn locations at the beginning of the race. If this happens, or if your stack falls off for some reason, just quit the race, abandon the quest, and try again. There is no limit on attempts. If you have to deviate substantially from a straight line to the next balloon, it's not worth it to collect a cloud ring. Once you have 10 stacks, going through additional cloud rings is not helpful except to reset your stack duration (though it does make an exciting sound) so it's best to try to aim for more distant rings that are closer to your intended path simply to keep your stack going.
In order to win the race easily, the only path deviation that is required occurs after the 7th balloon. Balloons 7, 8, and 9 are in or near bridge arches, close to the finish line. The quickest path through this part of the race is to collect balloon 7, turn around and follow the bridge to balloon 9, and then collect balloon 8 on the way to balloon 10 and the finish line.
Doing this should allow you to finish substantially ahead of the black dragon.
Note that even though neither the prize bag nor the commendation inside are soulbound, transferring them to another player causes the commendation to disappear. You can, however, keep the prize in your bag until you want to use it (if you were valor capped, for instance.)