The answer is 9.9 ft.
Imagine that the ladder is a hypotenuse of a right triangle (since ground and the building form a right angle). The sum of angles in a triangle is 180°. If we have:
90° + 45° + x° = 180°
135° + x = 180°
x = 45°
Since two angles are the same this is isosceles triangle a = b.
Use the Pythagorean theorem:
a² + b² = c²
a = b
a² + a² = c²
2a² = c²
c = 14 ft
2a² = 14²
2a² = 196
a² = 196/2 = 98
a = √98 ≈ 9.9 ft