Two helicopters, A and B, 25 kilometres apart flying at the same altitude, receive an S.O.S. distress signal from a cap-sized boat (C). The angle of depression from helicopter A to the boat is 40° while the angle of depression from helicopter B to the boat is 30 °.

a) Calculate the distance each helicopter must travel to reach the cap-sized boat.
b) Find the height of the two helicopters.

If C is in the same direction from both A and B, then draw a diagram and you can see that the height h can be found using

h cot30° - h cot40° = 25

h/AC = sin30°
h/BC = sin40°
those are direct-line distances to the boat on the surface.
If you want the horizontal distances then use the tangent function.