Since 4 is between 2 & 5 you input it into the middle equation.
x=4
so the answer is 4!
The angle of elevation from the hiker to the park ranger is the same as the angle of depression from the ranger to the hiker, 29°.
The tangent function of an angle is the ratio of the opposite side (500') to the adjacent side (x) in the right triangle shown. That is
tan(29°) = 500' / x
Multiplying the equation by x/tan(29°) gives
x = 500' / tan(29°)
x ≈ 500' / 0.5543
x ≈ 902 ft