You will need to compute the length of the line from (2,4) perpendicular to the line 2x - 6 as that would be the shortest distance from the point to the line.
First we need to find the equation of that perpendicular line. It will have slope which is the negative reciprocal of the slope of the line 2x - 6, whose slope is 2, so the slope of the perpendicular line is -1/2.
equation of perpendicular line:
y = -1/2x + b
substitute (2,4), the end point of the perpendicular line for (x,y) to find b:
4 = -1/2(2) + b
5 = b
so equation of perpendicular line is: y = -1/2x + 5
equate equation of original line and perpendicular line to find intersecting (x,y):
2x - 6 = -1/2x + 5
5/2 x = 11
x = 22/5
substitute 22/5 for x in equation 2x-6 to find y: 2(22/5) - 6 = 44/5 - 30/5 = 14/5
intersecting (x,y) is (22/5, 14/5) = (4.4, 2.8)
use distance formula to find distance between (2,4) and (4.4,2.8):
distance = sqrt ((4.4-2)^2 + (2.8-4)^2)) = 2.68