<s>[INST] How does $x^2-8x+17=0$ have nonreal solutions? 
The solutions of $x^2-8x+17=0$ are $4 + i$ and $4 - i$.

Well, I calculated and the results are different.
$$\begin{align}
x^2-8x+17 &= 0 \\
x^2-8x &=17 \\
x(x-8) &= 17 
\end{align}$$
So the roots are $x=17$ or $x=17+8=25$.
Why $i$ comes from the problem? Could you please explain about it?
 [/INST] Also note:
If the solutions are $a, b$ then $(x-a)(x-b) = 0$ and $x^2 -(a+b)x + ab = 0$ and as $x^2 - 8x +17 =0$ we would have $a+b = 8$ and $ab = 17$.
Option 1:  $4 + i$ and $4- i$.  Then $(4+i) + (4-i) = (4+4) + (i-i) = 8$.  So for so good.  $(4-i)(4+i) = 16 + 4i - 4i -i^2 = 16 -i^2 = 16 -(-1) =16+1 = 17$.  That works.
Option 2: $-8, 17$.  Then $-8 + 17 =9 \ne 8$ so no good.  ANd $(-8)\cdot 17=-onehundredsomethingbig \ne 17$.  Really no good.
Option 3: $4$ and $-4$.  Then $4+ (-4) = 0\ne 8$.  No good.  And $4\times (-4) = -16 \ne 17$. No good.
Option 4: $\sqrt{17},-\sqrt{17}$.  Then $\sqrt{17}+(-\sqrt{17}) = 0\ne 8$.  And $\sqrt{17}\cdot (-\sqrt{17}) = -17\ne 17$.  So no good.
</s>