To divide by a fraction, multiply by its reciprocal.

Consider the form . Find a pair of integers whose product is and whose sum is . In this case, whose product is and whose sum is .

Write the factored form using these integers.

Cancel the common factor of .

Cancel the common factor.

Rewrite the expression.

Multiply and .

Simplify ((x+2)/(x-1))÷((x+4)/(x^2+4x-5))