The shortest distance between a point and a line is the length of the perpendicular segment from the point to the line. In this case, that is AB. The distance from A to B can be calculated using the distance formula.
d=(x2−x1)2+(y2−y1)2
By substituting the points for A and B into the formula we can calculate the distance