Hello,
y=ax+b is the asymptote
with
[tex]$a= \lim_{n \to \infty} \frac{f(x)}{x}=\lim_{n \to \infty} \dfrac{x^2+x-2}{x^2+x}=1\\\\
[/tex]
[tex]$b= \lim_{n \to \infty} f(x)-ax= \lim_{n \to \infty} \frac{x^2+x-2}{x+1}-x= \lim_{n \to \infty} \frac{-2}{x+1}=0 $[/tex]