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.