Coming first is simply a matter of not hitting any objects or walls and using the shortcut towards the end. The shortcut is between the metal pillars, the AI will always take the outside path so you can catch up by a second or two every lap. My video below demonstrates using the shortcut and coming first.