Rewrite as .

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

Simplify.

Move to the left of .

Raise to the power of .

Rewrite as .

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

Cancel the common factor.

Rewrite the expression.

Simplify (x^3-125)/(x^2-25)