A (x_1,y_1)

B (x_2,y_2)

|x_2-x_1|

|y_2-y_1|

B = (8, 7)
xB: x(B)
yB: y(B)
A = (2, 2)
yA: y(A)
xA: x(A)
a = Segment(A, B)
b = OrthogonalLine(B, xAxis)
c = OrthogonalLine(A, b)
C = Intersect(b, c)
d = Segment(B, C)
e = Segment(C, A)
f = OrthogonalLine(A, xAxis)
D = Intersect(f, xAxis)
E = Intersect(b, xAxis)
g = Segment(A, D)
h = Segment(C, E)
F = Intersect(c, yAxis)
i = Segment(A, F)
T7: "d(A,B)=" + (sqrt((xB - xA)² + (yB - yA)²))