Answer
$$
y=\frac{2 x^{2}+x-1}{x^{2}+x-2}
$$
We obtain that:
$y = 2$ is a horizontal asymptote.
$x=-2$ and $x=1$ are vertical asymptotes.
The graph confirms our work.
Work Step by Step
$$
y=\frac{2 x^{2}+x-1}{x^{2}+x-2}
$$
we calculated that
$$
\lim _{x \rightarrow \pm \infty} \frac{2 x^{2}+x-1}{x^{2}+x-2}
$$
we divide the numerator and denominator by the highest
power of $x$ in the denominator, which is just $x$:
$$
\begin{aligned}
\lim _{x \rightarrow \pm \infty} \frac{2 x^{2}+x-1}{x^{2}+x-2} &=\lim _{x \rightarrow \pm \infty} \frac{\frac{2 x^{2}+x-1}{x^{2}}}{\frac{x^{2}+x-2}{x^{2}}} \\
&=\lim _{x \rightarrow \pm \infty} \frac{2+\frac{1}{x}-\frac{1}{x^{2}}}{1+\frac{1}{x}-\frac{2}{x^{2}}} \\
&=\frac{\lim _{x \rightarrow \pm \infty}\left(2+\frac{1}{x}-\frac{1}{x^{2}}\right)}{\lim _{x \rightarrow \pm \infty}\left(1+\frac{1}{x}-\frac{2}{x^{2}}\right)}\\
&=\frac{\lim _{x \rightarrow \pm \infty} 2+\lim _{x \rightarrow \pm \infty} \frac{1}{x}-\lim _{x \rightarrow \pm \infty} \frac{1}{x^{2}}}{\lim _{x \rightarrow \pm \infty} 1+\lim _{x \rightarrow \pm \infty} \frac{1}{x}-2 \lim _{x \rightarrow \pm \infty} \frac{1}{x^{2}}}\\
&=\frac{2+0-0}{1+0-2(0)}\\
&=2
\end{aligned}
$$
so, $y = 2$ is a horizontal asymptote.
$$
y=f(x)=\frac{2 x^{2}+x-1}{x^{2}+x-2}=\frac{(2 x-1)(x+1)}{(x+2)(x-1)}
$$
so,
$$
\lim _{x \rightarrow -2^{-}}f(x)=\infty,
$$
$$
\lim _{x \rightarrow -2^{+}}f(x)=-\infty,
$$
$$
\lim _{x \rightarrow 1^{-}}f(x)=-\infty,
$$
and
$$
\lim _{x \rightarrow 1^{+}}f(x)=\infty
$$
Thus $x=-2$ and $x=1$ are vertical asymptotes. The graph confirms our work.