We need to determine the standard angle theta for the respective airplane; this will make it easy to use the horizontal distance d to compute the hati and hatj components of the vector for the plane. The hatk is easy because it is given as the as the altitude in meters. For any given airplane, n, the vector is as follows:
vecv_n = d_ncos(theta_n)hati+d_nsin(theta_n)hatj+"altitude"_nhatk
For the first airplane convert given heading to a standard angle with the reference point as East.
For airplane 1 we are given 38^@ South of West
West is 180^@ from East and add 38^@ to make it move toward the South:
theta_1 = 180^@+38^@
theta_1 = 218^@
Convert the distance from km to meters:
d_1 = 19.8" km"
d_1 = 19800" m"
"altitude"_1 = 900" m"
vecv_1 = (19800cos(218^@)" m")hati+(19800sin(218^@)" m")hatj+(900" m")hatk
vecv_1= -15602hati -12190hatj + 900hatk in meters
For the second airplane convert given heading to a standard angle with the reference point as East.
For airplane 2 we are given 23^@ West of South
South is 270^@ from East and subtract 23^@ to make it move toward the West:
theta_2 = 270^@-23^@
theta_2 = 247^@
Convert the distance from km to meters:
d_2 = 17.7" km"
d_2 = 17700" m"
"altitude"_2 = 1100" m"
vecv_2 = (17700cos(247^@)" m")hati+(17700cos(247^@)" m")hatj+(1100" m")hatk
vecv_2 = -6916hati -16293hatj + 1100hatk in meters
The vector from airplane 1 to airplane 2# is:
vecv_(1to2) = vecv_2-vecv_1
vecv_(1to2) = (-6916- -15602)hati+ (-16293- -12190)hatj+ (1100-900)hatk
vecv_(1to2) = 8686hati-4103hatj+ 200hatk in meters
The distance between the planes is the magnitude of the vector:
|vecv_(1to2)| = sqrt(8686^2+ (-4103)^2+ 200^2) in meters
|vecv_(1to2)| = 9608 meters