Since both terms are perfect squares, factor using the difference of squares formula, where and .

Since both terms are perfect cubes, factor using the difference of cubes formula, where and .

Check the middle term by multiplying and compare this result with the middle term in the original expression.

Simplify.

Factor using the perfect square trinomial rule , where and .

Cancel the common factor of .

Factor out of .

Cancel the common factor.

Rewrite the expression.

Cancel the common factor of .

Factor out of .

Cancel the common factor.

Rewrite the expression.

Multiply and .

Cancel the common factor of .

Cancel the common factor.

Rewrite the expression.

Simplify (x^2-w^2)/(x^3-w^3)*(x^2+xw+w^2)/(x^2+2xw+w^2)