(-2/x-1)=(x-8/x+6)

please help i'm having a hard time doing this by steps

To solve the equation (-2/x-1) = (x-8/x+6), we need to eliminate the denominators and simplify the expression. Here are the steps:

Step 1: Multiply both sides of the equation by the denominators (x-1) and (x+6) to get rid of the fractions.

(x-1)(x+6)(-2/x-1) = (x-1)(x+6)(x-8/x+6)

Step 2: Simplify both sides of the equation by canceling out the common factors.

-2(x+6) = (x-1)(x-8)

Step 3: Distribute and simplify both sides of the equation.

-2x - 12 = x^2 - 9x + 8

Step 4: Rearrange the equation to form a quadratic equation.

x^2 - 9x + 8 + 2x + 12 = 0

x^2 - 7x + 20 = 0

Step 5: Factor or use the quadratic formula to solve the equation.

Factoring: (x - 5)(x - 4) = 0

Setting each factor equal to zero, we get:
x - 5 = 0 or x - 4 = 0

Solving these equations, we find that:
x = 5 or x = 4

So, the solutions to the given equation are x = 5 and x = 4.