I do not how to do this problem could some one help me please.

x+1/x+2-x^2+1/x^2-x-6

You will have to re-type it using brackets to establish the proper order of operations.

The way it stands it means
x + (1/x) - x^2 + (1/x^2) - x - 6

I am sure that is not what you meant

could it be
(x+1)/(x+2-x^2) + 1/(x^2-x-6) ?

x+1 over x+2 minus x^2+1 over x^2 minus x- minus 6

this is the right way

ok, I read that as

(x+1)/(x+2) - (x^2 + 1)/(x^2 - x - 6)
= (x+1)/(x+2) - (x^2 + 1)/[(x-3)(x+2)]
(so the LCD is (x-3)(x+2) )

= (x+1)(x+2)/[(x-3)(x+2)] - (x^2 + 1)/[(x-3)(x+2)]
= (x^2 + 3x + 2 - x^2 - 1)/[(x-3)(x+2)]
= (3x-1)/[(x-3)(x+2)]

To simplify the expression, we need to first find the common denominator for all the fractions involved.

Let's break down the denominator of the fractions:

x + 1 / x + 2 - x^2 + 1 / x^2 - x - 6

To find the common denominator, we need to factorize the denominators and determine the least common multiple:

The first denominator (x + 2) cannot be further simplified.

The second denominator (x^2 - x - 6) can be factored as (x - 3) (x + 2).

Now, let's rewrite the expression with the common denominator:

(x(x - 3)) / (x + 2) - ((x + 1)(x - 3)) / (x^2 - x - 6)

Since (x + 2) is the common denominator, we can combine the two fractions:

(x(x - 3) - (x + 1)(x - 3)) / (x + 2)

Now, we can simplify the numerator:

(x^2 - 3x - x^2 + 4x + 3) / (x + 2)

Combining like terms:

(x - x^2 + x + 3) / (x + 2)

Simplifying further:

(-x^2 + 2x + 3) / (x + 2)

Thus, the simplified expression is (-x^2 + 2x + 3) / (x + 2).