Answer: The distance up the building is 24 metres.
Step-by-step explanation: Please refer to the picture attached for more details.
The diagram shows two ladders as given in the question. The shorter one is line AC, and the longer ladder is line AB. The bottom of the longer ladder has an additional length of 8 metres from the bottom of the building than the shorter one hence you have triangle ABC. The question requires the distance of both ladders up the building (since both ladders reached the same distance up the building, that is line AD).
We shall begin by finding angle B in triangle ABC, and we shall apply the cosine rule which states as follows;
b² = a² + c² - 2acCos B
Substituting for the values as shown in the diagram, where a = 8, b = 26 and c = 30, we now have
26² = 8² + 30² - 2[8*30] Cos B
676 = 64 + 900 - 480CosB
676 = 964 - 480CosB
676 - 964 = -480CosB
-288 = -480CosB
-288/-480 = CosB
0.6 = CosB
Checking with a calculator,
B = 53.13
We can now use triangle ABD to solve for the height as shown by line AD also labelled y.
With the hypotenuse as 30, and the opposite shown as y (line facing the reference angle 53.13),
Sin B = opposite/hypotenuse
Sin 53.13 = y/30
0.7999 = y/30
0.7999*30 = y
23.997 = y
Rounded to the nearest whole number
y = 24
Therefore, both ladders reached 24 metres up the building