Find the complex roots of the equation and do a check: $$ x^{2} + (2+i)x-1+7i=0 $$
What I've done: $$D=b^2-4ac=(2+i)^2-4(-1+7i)=4+4i+4-28i=8-24i$$ $$\sqrt{8-24i}=\pm(\sqrt{(640-8)/2}+i(640+8)/2) = \sqrt{316}+18i$$
Here the wrong calculation. And then it will be necessary to calculate $x_1$ and $x_2$.