Q:

Why does $k^2+4k+4$ become $(k+2)^2$?

I'm studying maths after a lot of years without having a look at it.
Currently I'm doing proof by induction, I have a doubt when doing an exercise.
If you have a look at this video at minute 5:15 , $[k^2+4k+4]$ becomes $(k+2)^2$ and I don't understand why.
Is there any rule or theorem that explains this?

A:

depending on the area of rectangle

$$k^2+2k+2k+4=(k+2)(k+2)$$
$$(k^2+4k+4)=(k+2)^2$$

A:

The general rule for squaring a sum is $(a+b)^2=a^2+2ab+b^2$. (This itself follows from the distributive law applied a number of times). Set $a=k$ and $b=2$, then you get $$(k+2)^2=k^2+4k+4$$
It doesn't matter that you had $k^2+4k+4$ and are going to $(k+2)^2$, because equalities work equally well in both directions. $P=Q$ asserts that $P$ is the same thing as $Q$, so if you have a $Q$ you can choose to look at it as a $P$ and vice versa.

