Skip the coaster above the big balloon. Head for the bottom rocket instead.
Then use the large circular control at the bottom of the screen, the one that lets you pick the type of element you are placing. Once the loop is in, drag the pencil down to the flag to finish the track and close out the level.