How do you beat the Staff Ghost in Mario Kart 8?

How do you beat the Staff Ghost in Mario Kart 8?