Length : 12 feet
Width : 10 feet
Let the length of the garden be x feet.
Therefore, the breadth or width of the garden is (x−2) feet.
So, According to the problem,
x(x−2)=120
⇒x2−2x=120
⇒x2−2x−120=0[Transposing 120 to the L.H.S]
⇒x2+10x−12x−120=0[Breaking −2x as 10x−12x]
⇒x(x+10)−12(x+10)=0[Taking the like terms aside]
⇒(x+10)(x−12)=0[Completing the factorisation]
We know, When two real quantities are multiplied and the product is zero, then one of them or both of them should be zero.
So, Either x+10=0 or x−12=0
So, x=−10or12
As x indicates length, x can't be negative.
So, x=12.
So, The length of the garden is 12 feet and the width of the garden is (12−2) feet = 10feet.