Answer:
The elevation gain is 4√2 or 5.6569
Explanation:
Consider the provided information.
The distance from the town of Bree to weathertop is 8 miles on a 45 degree upward slope,
The required figure is shown in figure 1.
Here, the triangle is right angle triangle with one angle 45 degree.
Thus, the measure of angles will be: 90°, 45° and 45°
Therefore, both legs of the triangle must be equal. Now by using Pythagorean Theorem,

Hence, the elevation gain is 4√2 or 5.6569