### Theory:

Identity $$2$$: ${\left(a+b\right)}^{2}={a}^{2}+\mathit{2ab}+{b}^{2}$

Let us construct a figure of four regions. The two square shaped regions with the dimensions of $$3 × 3$$ (Blue) and $$2 × 2$$ (Yellow). Observe the remaining two rectangle shaped regions. Both are in $$3 × 2$$ (Green) dimension. By observing the above rectangle, we can notice that:

$$\text{Area of the bigger square = Area of the two small square + Area of the two rectangles}$$

$$3 + 2$$$$2 + 3$$ $$=$$ $$(3 × 3) + (2 × 3) + (3 × 3) + (2 × 2)$$

Now, we simplify the LHS and RHS of the above expression.

LHS $$=$$ $$3 + 2$$$$2 + 3$$ $$=$$ $$5×5 = 25$$

RHS $$=$$ $$(3 × 3) + (2 × 3) + (3 × 3) + (2 × 2)$$

$$=$$ ${3}^{2}+\left(2×3\right)+\left(3×2\right)+{2}^{2}$ $$=$$ $$9+6+6+4 = 25$$

Therefore, LHS $$=$$ RHS

Similarly, if we use the variables in this case instead of number we get: Assume the square of ABCD of side $$a + b$$. From the above figure, we can get that:

$$\text{The total area of the bigger square = The area of the two small squares × The are of the two rectangles}$$

That is, $$(a + b)^2$$$={a}^{2}+\mathit{ab}+\mathit{ba}+{b}^{2}$

Since, $$ba=ab$$;  $$(a + b)^2$$ $={a}^{2}+\mathit{ab}+\mathit{ab}+{b}^{2}={a}^{2}+2\mathit{ab}+{b}^{2}$.

Therefore, ${\left(a+b\right)}^{2}={a}^{2}+\mathit{2ab}+{b}^{2}$ is a identity.
Example:
Simplify the expression $\left(x+2\right)\left(x+2\right)$ using the identity ${\left(a+b\right)}^{2}={a}^{2}+\mathit{2ab}+{b}^{2}$.

Now write the given expression $\left(x+2\right)\left(x+2\right)$ with respect to the given identity ${\left(a+b\right)}^{2}={a}^{2}+\mathit{2ab}+{b}^{2}$.

$\begin{array}{l}\left(a+b\right)\left(a+b\right)=\left(x+2\right)\left(x+2\right)\\ \\ {\left(x+2\right)}^{2}=\left({x}^{2}+2\left(2×2\right)x+{2}^{2}\right)\end{array}$

Now simplify the expression.

$=\left({x}^{2}+8x+4\right)$.

Therefore, $\left(x+2\right)\left(x+2\right)$$=\left({x}^{2}+8x+4\right)$.