You can calculate the distance directly.

...but that doesn't quite find the point. However, given that distance, you can construct a circle on on the point, using the distance as radius. Find the intersection of the line and the circle.

A little easier would be just to use lines.

1) Find the slope of the line.

2) Realize that the slope of the perpendicular is the negative reciprocal of that slope.

3) Realize that the closest point on the line is at the perpendicular through the remote point.

4) Construct the equation of the line through your point and perpendicular to the line.

6) Solve the two-equation system for x and y.