Finding factors of second order complex polynomial. It concerns with finding roots of complex polynomial:
$x^2+(i-1)x+(2+i)$. One way is to find roots by factoring, as:$(x-i)(x -(1-2i))=(x-i)(x-1+2i)=(x^2 -x +ix +i +2)=x^2 +x(i-1)+(i+2)$ 
But, this is a guess game for me, with no formal process to get in this case.
The logical process is to take roots of the quadratic equation, but I hope the quadratic formula does not work for complex coefficients. 

Update -- Based on comments by @WillJagy, the square root is $\pm1\pm3i$, hence the equation is having roots as :$\frac{-(i-1)\pm\sqrt{-6i-8}}2\implies \frac{(1-i)\pm(\pm 1\pm 3i)}2$ can have possible values:  (i) for $1+3i$, get: $x_{11} = 1+i, x_{12} = -2i$
(ii) for $1-3i$, get: $x_{21} = 1-2i, x_{22} = i$
(iii) for $-1+3i$, get: $x_{11} = i, x_{21} = 1-2i$
(iv) for $-1-3i$, get: $x_{11} = -2i, x_{21} = 1+i$
So, the $4$ root pairs should be tried one by one:
(i) $1+3i =>(x-1-i)(x+2i) = x^2 +ix -x -2i +2$, mismatch 
(ii) $1-3i => (x-i)(x-1+2i) = x^2 -x +ix +i +2$, matches original equation 
(iii) same as for (ii),  
(iv) same as for (i)
Why only two root pairs match, and the other don't?

Some answers on mse : 1

Update 2 -- To add to the answer by @Skip, where the fourth quadrant angle was transformed to the first one by taking out $\sqrt{-1} = i$ as common factor. For mixed sign discriminant, let $D = -6 +8i$, then angle cannot be taken\manipulated to be in the first quadrant; & can lie in the 2nd or 3rd quadrant.
In 2nd quad., $\sin$ of negative angle is positive, while in 3rd quad. both $\sin, \cos$ are negative.
 A: $$x^2+(i-1)x+2+i=0$$
So
$$x=\frac{-(i-1)\pm\sqrt{-8-6i}}{2}=\frac{-(i-1)\pm i\sqrt{8+6i}}{2}$$
$$\sqrt{8+6i}=\sqrt{10}\left(\cos\left(\frac{\tan^{-1}\left(\frac{3}{4}\right)+2\pi k}{2}\right)+i\sin\left(\frac{\tan^{-1}\left(\frac{3}{4}\right)+2\pi k}{2}\right)\right)\space\space\space\text{k=0, 1}$$
Take $k=0$ since if $k=1$, we'll just get the negative of when $k=0$ and the $\pm$ in front of the square root takes care of this for us
These are nonstandard trig arguments but
$$\cos\left(\frac{1}{2}\tan^{-1}\left(\frac{3}{4}\right)\right)=\frac{3}{\sqrt{10}}$$
$$i\sin\left(\frac{1}{2}\tan^{-1}\left(\frac{3}{4}\right)\right)=i\frac{1}{\sqrt{10}}$$
Therefore
$$\sqrt{8+6i}=3+i$$
So
$$x=\frac{1-i\pm (-1+3i)}{2}$$
$$\boxed{x=i}$$
$$\boxed{x=1-2i}$$
Quadratic formula works

I'll keep the above because that is what appeared in the original problem, but here's how to evaluate $\sqrt{-6+8i}$.
$-6+8i$ is in the second quadrant
$$\theta=\tan^{-1}\left(\frac{8}{-6}\right)$$
But this angle describes a complex number in the fourth quadrant since $tan^{-1}(x)$ has the range $-\frac{\pi}{2}< x<\frac{\pi}{2}$, so add $\pi$ to swing it to the second quadrant
$$\theta=\tan^{-1}\left(\frac{8}{-6}\right)+\pi$$
Its magnitude is still $10$, so for $k=0,\space 1$
$$\sqrt{-6+8i}=\sqrt{10}\left(\cos\left(\frac{\tan^{-1}\left(\frac{-4}{3}\right)+\pi+2\pi k}{2}\right)+i\sin\left(\frac{\tan^{-1}\left(\frac{-4}{3}\right)+\pi+2\pi k}{2}\right)\right)$$
These arguments are not standard by any means, so I admittedly used a calculator and will again for evaluating this one too, which is why there is no work shown in evaluating them. The point of this post though is that the quadratic formula works for complex numbers.
I like Siong's way for solving the square root; the results will be the same and it's nicer to work with in this case. Sometimes this way is easier in case the polynomial isn't easily factorable, it depends on the problem
Taking $k=0$
$$\cos\left(\frac{\tan^{-1}\left(\frac{-4}{3}\right)+\pi}{2}\right)=\frac{1}{\sqrt{5}}$$
$$i\sin\left(\frac{\tan^{-1}\left(\frac{-4}{3}\right)+\pi}{2}\right)=i\frac{2}{\sqrt{5}}$$
So
$$\sqrt{-8+6i}=\sqrt{2}(1+2i)$$
Taking $k=1$ will result in $\sqrt{-8+6i}=\sqrt{2}(-1-2i)$ but the plus and minus takes care of this for us
$$\pm\sqrt{2}(1+2i)=\mp\sqrt{2}(-1-2i)$$
Say if the radicand were $6-8i$, then this lies in the fourth quadrant, so we would not have added $\pi$ when finding its angle.
A: Let $z=a+bi, a,b, \in \mathbb{R}$, where $$z^2 = -8-6i$$
$$(a+bi)^2=(-8-6i)$$
$$a^2-b^2+2abi=-8-6i$$
that is we have 
$$a^2-b^2=-8\tag{1}$$
$$ab=-3\tag{2}$$
Substituting $(2)$ into $(1)$,
$$a^2-\frac{9}{a^2}=-8$$
$$a^4+8a^2-9=0$$
$$(a^2-9)(a^2+1)=0$$
$$a=\pm3$$
when $a=3$, from $ab=-3$,$b=-1$.
when $a=-3$, from $ab=-3$, $b=1$ 
There are only two solutions for $z^2=-8-6i$, $z_1 = 3-i$ and $z_2 = -3+i$ and we have $z_2 = -z_1$. That is the solutions to $z^2 = -8-6i$ are $\pm(3-i)$
The solution to the original problem is 
$$x=\frac{(1-i) \pm z_1}{2}$$
You might have solved for $a$ and substitute it into $(1)$ and thought that for each $a$, there are $2$ possible values of $b$'s. However, remember that you have to check all the constraitns, constraint $(2)$ tells us that for each non-zero $a$, there is exactly one $b$.
You shold be expecting $2$ roots counting multiplicity for a quadratic equation from fundamental theorem of algebra.
