Distance between the points is given by
√(x1−x2)2+(y1−y2)2
Therfore distance between points (0, 0) and (36, 15)
=√(36−0)2+(15−0)2
=√362+152
=√1296+225=√1521=39
Yes, assume town A at origin point (0, 0).
Therefore, town B will be at point (36, 15) with respect to town A.
And hence, as calculated above, the distance between town A and B will be 39 km.