Finding the second point of a line segment