The first step is to draw the picture.
We want to find the opposite side.
We know the adjacent side
The trig function with opposite and adjacent is tangent
tan 47 = opp / adjacent
tan 47 = opp/40
40 * tan 47 = opp side
42.8947484 = opp side
Rounding to the nearest tenth
42.9 ft