Explanation:
I cannot draw a diagram here.
but I can explain what to do in general.
the shortest distance from a point to a line is always via a connecting line that is perpendicular to the given line and his through the given point.
and then the distance from the given point to the intersection point is calculated.
every line is defined in the form like
y = ax + b
where a is the slope of the line, and b is the intersection point on the y-axis (the offset from point 0).
the slope of a line is the ratio y/x defining how many units y changes when x changes a certain amount of units.
in our example,
y = 5x - 10
5 (or rather 5/1) is the slope of the line.
it means that y grows by 5 units every time x grows by 1 unit.
a perpendicular line (cuts the original line with a 90 degree angle) has a related slope : it reverts x and y and flips the sign :
5/1 turns into -1/5
that means at the perpendicular line whenever x grows by 5 units, y goes down by 1 unit.
so, the first approach for the perpendicular line is
y = -1/5 x + b
to get b we use the given point (6, 5) that has to be in the perpendicular line.
5 = -1/5 × 6 + b
25/5 = -6/5 + b
31/5 = b
=> y = -1/5 x + 31/5
the intersecting point is now where both lines are equal
5x - 10 = -1/5 x + 31/5
25x - 50 = -x + 31
26x = 81
x = 81/26
y = 5×(81/26) - 10 = 405/26 - 260/26 = 145/26
the distance of the given point (6, 5) to the line intersection point (81/26, 145/26) is the calculated as
distance² = (6 - 81/26)² + (5 - 145/26)²
distance = sqrt((6-81/26)² + (5-145/26)²)
since the result was not requested here, I save us the calculation.