how to solve for the distance of a point through a line?