earth You need to show that if a place has (latitude, longitude) = (p,q) then its coordinates are
(R cosp cosq, R cosp sinq, R sinp).

section Steps in the calculation

We need the distance l on the surface between A and B.

First calculate the three-dimensional coordinates of A and B from the latitude and longitude of the two points.

Then calculate the distance 2d (imagine a tunnel straight through the earth from A to B) using Pythagoras Theorem.

Use R, the radius of the Earth, and d to find the angle q radians where
sinq = d
R
.
Calculate the arc length l.