Rewrite as .

Apply the distributive property.

Apply the distributive property.

Apply the distributive property.

Simplify each term.

Multiply by .

Rewrite using the commutative property of multiplication.

Rewrite using the commutative property of multiplication.

Multiply by by adding the exponents.

Move .

Multiply by .

Multiply by .

Multiply by .

Subtract from .

Move .

Subtract from .

Rewrite as .

Apply the distributive property.

Apply the distributive property.

Apply the distributive property.

Simplify each term.

Multiply by .

Rewrite using the commutative property of multiplication.

Rewrite using the commutative property of multiplication.

Multiply by by adding the exponents.

Move .

Multiply by .

Multiply by .

Multiply by .

Subtract from .

Move .

Subtract from .

Add and .

Subtract from .

Add and .

Factor out of .

Factor out of .

Factor out of .

Factor out of .

Factor out of .

Factor out of .

Factor using the perfect square rule.

Rearrange terms.

Check that the middle term is two times the product of the numbers being squared in the first term and third term.

Rewrite the polynomial.

Factor using the perfect square trinomial rule , where and .

Factor (a-b)^2+(a-b)^2