multiply both sides by (x-2)(x+1) to clea fractions
x(x+1)+(x-1)(x-2)=(-1)(x-2)(x+1)
distribute
x^2+x+x^2-3x+2=-x^2+x-2
add like terms
2x^2-2x+2=-x^2+x+2
add x^2 to both sdes
3x^2-2x+2=x+2
minus x from both sides
3x^2-3x+2=2
minus 2 both sides
3x^2-3x=0
factor
(3x)(x-1)=0
set to zero
3x=0
x=0
x-1=0
x=1
x=0 or 1