A length of rope is stretched between the top edge of a building and a stake in the ground. The head of the stake is at ground level. The rope also touches a tree that is growing halfway between the stake and the building. If the building is 40 ft tall, how tall is the tree?

18 ft

80 ft

20 ft

10 ft

Let's assume the length of the rope is L and the distance from the stake to the tree is x.

Since the tree is growing halfway between the stake and the building, the distance from the tree to the stake is x as well.
We can form a right triangle with the rope as the hypotenuse, the building as the vertical leg, and the tree to the stake as the horizontal leg.

Using the Pythagorean theorem, we have:
(40 ft)^2 + x^2 = L^2

Since the rope touches the tree, the length of the rope is also equal to the distance from the building to the tree plus the distance from the tree to the stake:
L = x + (x + 40 ft)

Substituting this expression for L into the equation above, we get:
(40 ft)^2 + x^2 = (2x + 40 ft)^2

Expanding and simplifying the equation, we have:
1600 ft^2 + x^2 = 4x^2 + 160x + 1600 ft^2

Subtracting x^2 from both sides and simplifying further, we get:
0 = 3x^2 + 160x

Solving for x by factoring out an x, we have:
0 = x(3x + 160)

Since the length cannot be 0, we have:
3x + 160 = 0
3x = -160
x = -53.33 ft

Since the height of the tree cannot be negative, we disregard the negative solution.
Therefore, the height of the tree is 20 ft.

Therefore, the correct option is:
20 ft