I was looking at Alegbra walkthrough by greg and at 1:07:50 this came 5 = (x+20)^2 and what i did was use (a+b)^2 but what greg did was sq root and i was preplexed that why did he do that…can any one help me that when should we expand and when should we sq root

To cancel the square term you can square root it → 5^2 = \sqrt{5^2}=5 and vice-versa is also true.
For example \sqrt{2} can be also represented as 2^{\frac{1}{2}}, thus to cancel the \frac{1}{2} term you can square it → (2^2)^{\frac{1}{2}}= 2^{\left(2 \times \frac{1}{2}\right)}= 2^{\left(\cancel{2} \times \frac{1}{\cancel{2}}\right)}=2

It’s easy to find the roots when the equation is of the form (x+p)(x+q) = 0 (x = -p, q) (factorised form) or(x + p)^2 = q (obtained by completing the square, where you can then take square roots on both side)