The closest point on a line, to another point, will be a point that's on a normal of that line, or a line that is perpendicular to it, notice picture below
so, y = 2x, has a slope of 2, a perpendicular line to it, will have a slope of negative reciprocal that, or
so, we know that line passes through the point 20,0, and has a slope of -1/2
if we plug that in the point-slope form, we get
now, the point that's on 2x and is also on that perpendicular line, is the closest to 20,0 from 2x, thus, is where both graphs intersect, as you can see in the graph
thus
solve for "x'
------------------------------------------------------------
not sure on the 2nd part, but sounds like, what's the distance from that point to 20,0, well, if that's the case, just use the distance equation