Could we not have directly skipped to the last line of the solution? The conclusion seems disjointed from the previous lines.
[Question]:
If $x^2+ax−3x−(a+2)=0$ has real and distinct roots, then minimum value of $(a^2+1)/(a^2+2)$ is...?
[Given Solution]:
$x^2+ax−3x−(a+2)=0$
$D=(a−3)^2+4(a+2)$
$⇒D=a^2−2a+17$
$D1=4−4(17)<0$
Therefore, $a^2−2a+17>0$ for all $a∈R$
Now, $(a^2+1)/(a^2+2)=1−1/(a^2+2)>1−(1/2)=1/2 $
What exactly were we able to prove in those first 5 lines of the solution? At first I thought we had proven that 'a' would always be real and never complex, but that doesn't seem to be the case.
For $x^2+ax−3x−(a+2)=0$ to have real and distinct roots, its discriminant $D$ must be strictly +ve. That is, we must have, $D\gt 0$, which is true because as you have rightly shown
$D=a^2−2a+17$ and since $D'=(2)^2-4(17)\lt 0$, We know that $ a^2-2a+17=0\implies$ the equation $D=0$ can not have any real root, that is $D\ne 0$ for any real $a$. In fact, $D=a^2-2a+17=(a-1)^2+16\gt 0 \;\;\forall a\in\mathbb R$. Therefore $a$ has to be real so that $D\gt 0$.
PS: 1) Geometrically, $D=a^2−2a+17$ represents a parabola on $D-a$ axis and since $D\gt 0$, it never intersects axis of $a$ and hence $D\ne 0$ rather $D\gt 0$.
2) In the first five lines, we showed that $a$ is real.