Evaluate $y'=-2-y+y^2$ 
$$y'=-2-y+y^2$$ and $y_{0}=2$ is a solution 

So it is a riccati ODE:
$y=2+z\Rightarrow z=y-2$ 
$z'=y'$
substation into the original ODE gives:
$z'=-2-(2+z)+(z+2)^2=-4-z+z^2+4z+4=z^2+3z$ 
So we have:
$z'=z^2+3z$ which is bernoulli $z'=3z+z^{1+1}$ when $k=1$
$w=\frac{1}{z}$
$w'=-z'\cdot z^{-2}=-(3z+z^2)z^{-2}=\frac{-3}{z}-1=-3w-1$
$w'+3w=-1$
$w_{h}=e^{-3\int dx}=e^{-3x+c}=e^{-3x}k$
$w_{p}=e^{-3x}k(x)$
$w'_{p}=-3e^{-3x}k(x)+k'(x)e^{-3x}$
Substation into $w'+3w=-1$:
$-3e^{-3x}k(x)+k'(x)e^{-3x}+3e^{-3x}k(x)=-1\Rightarrow k'(x)e^{-3x}=-1\Rightarrow k'(x)=-e^{3x}$
integrating gives:
$k(x)=\frac{-e^{3x}}{3}+c$
So
$w_{p}=e^{-3x}(\frac{-e^{3x}}{3}+c)=-\frac{1}{3}+ce^{3x}$
$w=w_{h}+w_{p}=e^{-3x}k-\frac{1}{3}+ce^{3x}$
is it correct?

Clearly $y=-1$ and $y=2$ are trivial solutions. Note that
$$ y^2-y-2=(y-2)(y+1)$$
and hence
$$ y'=(y-2)(y+1)$$
or
$$ \frac{dy}{(y-2)(y+1)}=dx.$$
Integrating both sides gives
$$ \int\frac{dy}{(y-2)(y+1)}=\int dx+C.$$
So
$$ \frac13\ln\left|\frac{y-2}{y+1}\right|=x+C$$
or
$$ \frac{y-2}{y+1}=Ce^{3x}$$
So the solution is
$$ y=\frac{2+Ce^{3x}}{1-Ce^{3x}}.$$
