How would you do this using the principles of continuous functions? I know how to do this by finding the equation perpendicular to the line and then finding the point of intersection.
What do you mean by "principles of continous functions"? The simplest and best way is to do what you say- find the equation of the perpendicular line.
Harder would be to write the distance function which is minimal only when its square, , is minimal, and find where the derivative is 0.