Distance between P (x1, y1) and Q (x2, y2) when PQ is parallel to y-axis is
x1−x2
y1−y2
When PQ is parallel to y-axis x1 = x2 and
the required distance is y1−y2