if you draw a picture this will be clear to you

we need to find the height of the helicopter, the horizontal distance between the ambulance and the helicopter is 4000 ft so

h is the helicopter height

now

d is the horizontal distance between the accident and the helicopter

find d, finally the ambulance should travel