height of ladder = 12 feet
let x be the distance from the wall to the base of the ladder then
height = 2x + 2
Using Pythagoras' identity
(2x + 2)² + x² = 13² ( expand bracket and simplify left side )
4x² + 8x + 4 + x² = 169 ( rearrange into standard form )
5x² + 8x - 165 = 0 ← in standard form
consider the factors of the product 5 × - 165 = - 825
which sum to the coefficient of the x- term + 8
These are + 33 and - 25
split the middle term using these factors
5x² - 25x + 33x - 165 = 0 ( factor by grouping )
5x(x - 5) + 33(x - 5) = 0 ( take out the common factor (x - 5) )
(x - 5)(5x + 33) = 0
equate each factor to zero and solve for x
x - 5 = 0 ⇒ x = 5
5x + 33 = 0 ⇒ x = -

but x > 0 ⇒ x = 5
Hence height of ladder = (2 × 5 ) + 2 = 12 feet