As a prerequisite, you have to make it to Rep Level 10.
Then, in the pause menu, under "Social", select Crew Time Trials (in the upper right), see image 1. Select a challenge and a racer to race (see image 2), then in the race, you must beat the ghost racer.
Image 1:
Image 2: