use foil which is a lazy way to remember theh distributive property
goes like this
multiply
First terms
Outer terms
Inner terms
Last terms
and add them all toegethe
so
(x+2)(x+2)
First: x times x or x²
Outer: x times 2 or 2x
Inner: 2 times x or 2x
Last: 2 times 2 or 4
add them toegether
x²+2x+2x+4=
x²+4x+4