Taking LHS of the identity:

(a + b)^{2}

This can also be written as:

= (a + b) (a + b)

Multiply as we do multiplication of two binomials and we get:

= a(a + b) + b(a + b)

= a^{2} + ab + ab + b^{2}

Add like terms and we get:

= a^{2} + 2ab + b^{2}

Rearrange the terms and we get:

= a^{2} + b^{2} + 2ab

Hence, in this way we obtain the identity i.e. (a + b)^{2} = a^{2} + b^{2} + 2ab