Here's what I did :
$$\text{Let }\quad y = \frac{\sin^2 x + \sin x - 1}{\sin^2 x - \sin x + 2} $$
$$\text{Let } \sin^2x=t$$
$$\Rightarrow\ (y-1)t^2-(y+1)t+2y+1=0 $$
$$\text{Since } t= \sin x\text{ is real,} $$
$$\text{Discriminant} \geqslant 0 $$
$$ \Rightarrow (y+1)^2-4(y-1)(2y+1) \geqslant 0$$
$$ \Rightarrow\ -7y^2+6y+5 \geqslant 0$$
$$\Rightarrow\ 7y^2-6y-5 \leqslant 0$$
$$\Rightarrow \ y\in\left[\frac{3-2\sqrt{11}}{7},\frac{3+2\sqrt{11}}{7}\right] $$
But the correct answer (according to wolfram) is
$$y \in \left[\frac{3-2\sqrt{11}}{7},\frac{1}{2}\right] $$
Please guide me how I should proceed further .
We substitute rather $s=\sin x$ and have to find the image of the help function $h:I:=[-1,1]\to \Bbb R$, $$ h(s) = \frac {s^2+s-1}{s^2-s+2} = 1+\frac {2s-3}{s^2-s+2} \ . $$ The denominator does not vanish (on $I=[-1,1]$). We compute the extremal points of $h$ on $I$. We have (using the second formula for $h$ or a CAS like mathematica or sage) $$ h'(s) = -\frac {2s^2 - 6s - 1}{(s^2 - s + 2)^2} \ . $$ The equation $h(s)=0$ has two solutions, $\frac 12(3\pm{\sqrt{3^2+2}})$, among them only $$a:=\frac 12(3-\sqrt {11})$$ is in $I$, the interval of definition of $h$.
The sign of $h'$ is minus on $[-1,a)$ and plus on $(a,1]$. So $h$ is decreasing on the first interval, then increasing on the second one.
Later EDIT: There is a question in the comments about getting the value for $h(a)$, since i need some more space, the details are added to the answer. The above computations were supported by computer, else the answer would not have been there in time. I was using sage, here are some pieces of code that support the above computations. Just a small comment on the choice of the CAS, sage is free (including access to the deepest piece of code), and supporting mathematical computations in a structural way. To get the factorization for $h'$, it is enough to ask for...
The roots of the numerator can be computed with bare hands or with a CAS, so the root $a=(3-w)/2$, $w:=\sqrt{11}$, is the root we need. Let us compute now $h(a)$.