If the point (x, y) is on the curve then this is
You want the minimum distance so you wish to minimize D. (The minimum of the distance and minimum of the distance squared obviously correspond to the same x value.)
So take the first derivative of D and set it to 0. What x values do you get? Which is the correct answer?