Use the formula from the other post to compute the shortest distance (i.e perpendicular distance) or . To find the vertical distance, choose a point on each line that has the same x-coordinate (then use the formula ). Likewise, for the horizontal distance, choose a point on each line that has the same y-coordinate (then use the formula . Really, are the easiest choices.