When given expressions like these, you can take the multiple of the denominators as the common denominator. so the common denominator for 3/(x + 1) and 1/(x - 2) is (x + 1)(x - 2)

Here's how to do the problem. There are two mainstream methods, the first is the one you are interested in.

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

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

-------------------- = ---------------

.....(x + 1)(x - 2)..........(x^2 - x - 2)

=> ........3x - 6 - x - 1..................1

........-------------------- = ---------------

.............(x + 1)(x - 2)..........(x^2 - x - 2)

=> ............2x - 7.......................1

........-------------------- = ---------------

.............(x + 1)(x - 2)..........(x^2 - x - 2)

notice that the denominators are the same, so the numerators must be the same.

so 2x - 7 = 1

=> 2x = 1 + 7

=> x = 4

The alternate method is this:

notice that 1/(x^2 - x - 2) = 1/(x + 1)(x - 2) .............so the bottom can factor into two expressions, each of which are the denominator of a fraction on the other side of the equal sign. We can multiply by the denominator (x + 1)(x - 2)

so we get:

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

=> 3(x - 2) - 1(x + 1) = 1

=> 3x - 6 - x -1 = 1

=> 2x - 7 = 1 ........................notice this is the same equation we ended up solving in the previous method

=> x = 4