We know that the bird is at a height of 40 feet and the ledge is 8 ft, so the bird is 32 ft higher than the ledge.
Then, we can draw a right triangle connecting the bird and the ledge. One side will represent the length, one side will represent the height, and the third side, the hypotenuse, will represent the straight line distance from the bird to the ledge.
Since this triangle is a right triangle, we can use sin(θ) = opposite / hypotenuse. Substituting in the values we already know, we get sin(22°) = 32 ft / x, where x is the distance from the bird to the ledge.
We can rearrange that equation to get:
x = 32 ft / sin(22°), which is about 85.42 ft.