When the 14 foot ladder is leaning against a building, which is vertical as shown in the attached graph, with 45 degree angle. If we use the sin equation for this problem we can find out the answer.
Sin 45 = X / 14
X = 14 * sin45
X = 9.9 foot
Therefore ladder will reach to 9.9 foot height in the building