The answer in the book however says

-(5x^2-17x-9)/(x-3)(x+2)

so I don't know what I am doing wrong, can you take me step by step through the problem. I have a lot of problems, but I think once I understand what I am doing wrong with this one I can get the rest.

What was the original question?

The original problem was x/(x-3)-4-(2x-5)/(x+2)

the original problem is

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

I posted something before this, so now this is how far I got.
The answer I know is -(5x^2-17x-9)/(x-3)(x+2)

first I get

(x)(x+2)/(x-3)(x+2)- (4)(x-3)(x+2)/(x-3)(x+2)-(2x-5)(x-3)/(x-3)(x+2)
Then I get

x^2+2x-4x^2-4x-24-2x^2-11x+15 (for the top)

When I put everything together I get

(-5x^2 -13x -9)/ (x-3)(x+2)

as you can see however I am having a problem with + and - because I get -13x instead of -17x so could you look at what I am doing wrong and explain it to me?

(x)(x+2)/(x-3)(x+2)- (4)(x-3)(x+2)/(x-3)(x+2)-(2x-5)(x-3)/(x-3)(x+2)
is ok for the top.

here you are looking at 3 terms, the key is to keep the brackets until you are ready for the subtraction.

You top should have looked like this

x^2+2x-(4x^2-4x-24)-(2x^2-11x+15)

which will then become
x^2+2x-4x^2+4x+24-2x^2+11x-15
=-5x^2 + 17x + 9 for the numerator

I also noticed that you had a -9 at the end in your given answer, it should have been +9 .

To solve the problem step by step, here's what you need to do:

1. Start with the original expression: (x)/(x-3)-4-(2x-5)/(x+2)

2. To simplify the expression, first find a common denominator for all the terms. In this case, the common denominator is (x-3)(x+2).

3. Start simplifying each term with the common denominator:
- For the first term, multiply the numerator and denominator by (x+2):
(x)(x+2)/(x-3)(x+2) = (x^2+2x)/(x-3)(x+2)

- For the second term, multiply the numerator and denominator by (x-3):
(4)(x-3)(x+2)/(x-3)(x+2) = (4x-12)(x+2)/(x-3)(x+2)

- For the third term, the denominator already has the common denominator, so just rewrite it as it is:
(2x-5)/(x-3)(x+2)

4. Now that all the terms have a common denominator, combine them:
(x^2+2x)/(x-3)(x+2) - (4x-12)(x+2)/(x-3)(x+2) - (2x-5)/(x-3)(x+2)

5. Next, perform the subtraction without removing the brackets:
= (x^2+2x - (4x-12)(x+2) - (2x-5))/(x-3)(x+2)

6. Expand the second term using distributive property:
= (x^2+2x - (4x^2 - 8x - 24) - (2x-5))/(x-3)(x+2)

7. Continue simplifying by distributing the negative sign in the third term:
= (x^2+2x - 4x^2 + 8x + 24 - 2x + 5)/(x-3)(x+2)

8. Combine like terms in the numerator:
= (-3x^2 + 8x + 29)/(x-3)(x+2)

And that's the simplified expression you obtained: (-3x^2 + 8x + 29)/(x-3)(x+2).