To find the height of the triangle-shaped roof, we can visualize the scenario. Since the triangle is symmetrical and has a 90° angle at the peak, we can denote the height of the triangle from the peak to the base in the center.
Given that the distance from either wall to the peak is 5 feet, the total width of the base (the bottom of the triangle) is: \[ 5 \text{ feet} + 5 \text{ feet} = 10 \text{ feet} \]
In a right triangle, the height (h) can be found using the properties of a right triangle. Here, the two walls form the legs of the triangle:
- The base (from the peak to the wall) is 5 feet.
- The height is what we are trying to find.
Using the Pythagorean theorem for the right triangle: \[ h^2 + (base/2)^2 = (hypotenuse)^2 \]
In this case, since we have a symmetrical triangle, we can denote:
- \( base/2 = 5 \text{ feet} \)
- Hypotenuse is the slant height of the roof, but since we don't have that and only the height is needed, we will assume it meets the walls at a right angle.
The height from the wall to the peak can be directly represented as the height \( h \) because we don't have information about the hypotenuses.
To find the height in relation to a right triangle setup, the base is already at 5 feet from the wall to the peak.
Since this is a 45-45-90 triangle (from symmetry) each side ratio is \( 1:1:\sqrt{2} \). Both the height and half the width (from the base to the wall) must equal since they have equal angles.
Thus, \[ h = 5 \text{ feet} \]
This eliminates the need of using Pythagorean theorem directly, we find that the height of the triangle extends vertically.
So the distance from the top of the wall to the peak of the roof is: \[ \boxed{5} \text{ feet.} \]