First, if you factor the top and bottom completely, an x-1 cancels and you're left with:
\(\displaystyle \int\frac{x^{2}+x-1}{(x-2)(x-1)}dx\)
Add and subtract \(\displaystyle x^{2}-3x+2\):
\(\displaystyle \frac{x^{2}+x-1-(x^{2}-3x+2)+(x^{2}-3x+2)}{x^{2}-3x+2}=\frac{x^{2}+x-1-(x^{2}-3x+2)}{x^{2}-3x+2}+\frac{x^{2}-3x+2}{x^{2}-3x+2}=\frac{4x-3}{(x-2)(x-1)}+1\)
Now, you can use partial fractions.
\(\displaystyle \frac{A}{x-2}+\frac{B}{x-1}=4x-3\)
OR do it without partial fractions:
add and subtract x-2:
\(\displaystyle \frac{4x-3+(x-2)-(x-2)}{(x-2)(x-1)}=\frac{5(x-1)-(x-2)}{(x-2)(x-1)}=\frac{5}{x-2}-\frac{1}{x-1}\)
Don't forget the 1. It can be integrated separately.