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
 A: Write
$$
\frac{a^2+1}{a^2+2}=1-\frac{1}{a^2+2}
$$
Minimizing this is the same as maximizing $1/(a^2+2)$ which, in turn, is the same as minimizing $a^2+2$ or, as well, minimizing $a^2$.
Since
$$
a=-\frac{x^2-3x-2}{x-1}
$$
the minimum value for $a^2$ is obtained when $x^2-3x-2=0$.
A: Minimizing $1 - \frac{1}{(t - \frac 4t +1)^2 + 2}$ is equivalent to minimizing $(t - \frac 4t +1)^2 + 2$. But obviously the minimal value for this is $2$, as the square of a number is always bigger than $0$. To find the value which minimizes it just solve $t- \frac4t + 1 = 0$
A: Your function will be maximum when the denominator will be minimum.
So, your work will be to calculate $$\frac{d}{dx}\left[\left\{(1-x)-\frac{4}{1-x}+1\right\}^2+1\right]=0$$
It will come down to $$2\left\{(1-x)-\frac{4}{1-x}+1\right\}\left\{-1-\frac{4}{(1-x)^2}\right\}=0$$
This will give rise to $2$ cases.
Case-$1$:
$$-1-\frac{4}{(1-x)^2}=0 \Rightarrow x \not \in \mathbb{R}$$
Hence $-1-\frac{4}{(1-x)^2}\not =0$ for any real $x$.
Case-$2$:
$$(1-x)-\frac{4}{1-x}+1=0$$
$$(1-x)^2+(1-x)-4=0$$
So $$1-x=\frac{-1\pm \sqrt{1+16}}{2}=\frac{\sqrt{17}\pm 1}{2}$$
Or $$x=1-\frac{\sqrt{17}\pm 1}{2}$$
This will give $2$ values of $x$. 
Compute $\frac{d^2}{dx^2}\left[\left\{(1-x)-\frac{4}{1-x}+1\right\}^2+1\right]$ and check for which value of $x$, the expression comes out to be positive.
That is where the function is minimised, or,  your actual function is maximised.
Hope this helps.
A: 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}$
