<s>[INST] If $x^2+ax-3x-(a+2)=0\;,$ Then $ \min\left(\frac{a^2+1}{a^2+2}\right)$ 
If $x^2+ax-3x-(a+2)=0\;,$ Then $\displaystyle \min\left(\frac{a^2+1}{a^2+2}\right)$

$\bf{My\; Try::}$ Given $x^2+ax-3x-(a+2)=0\Leftrightarrow ax-a = -(x^2-3x-2)$
So we get $$a=\frac{x^2-3x-2}{1-x} = \frac{x^2-2x+1+1-x-4}{1-x} = \left[1-x-\frac{4}{1-x}+1\right]$$
Now $$f(a) = \frac{a^2+1}{a^2+2} = \frac{a^2+2-1}{a^2+2} = 1-\frac{1}{a^2+2}$$
So $$f(x) = 1-\frac{1}{\left[(1-x)-\frac{4}{1-x}+1\right]^2+2}$$
Now put $1-x=t\;,$ Then we get $$f(t) =1- \frac{1}{\left(t-\frac{4}{t}+1\right)^2+2}$$
Now How can I maximize $\displaystyle \frac{1}{\left[(1-x)-\frac{4}{1-x}+1\right]^2+2, }\;,$ Help Required, Thanks
 [/INST] there is a high-school method.
since $\frac{a^2+1}{a^2+2}$ is an even function, and it's decreasing when $x \lt 0$, and increasing when $x \gt 0$, all we need to do is to find the min value of $\mid a \mid$.
since $x^2 + (a - 3) x - (a - 2) = 0$ has root(s) as real number(s), it follows that
$$
\Delta = (a - 3)^2 + 4 \cdot 1 \cdot (a - 2) \geq 0
$$
so we have $a^2 - 2a + 1 \geq 0$, and the min value of $a$ is $0$
so the min value of $\frac{a^2+1}{a^2+2}$ is $\frac{1}{2}$
</s>