Solution (source code)

= Solution

The quadratic <polynomial> factors as
$$
z^2-(3+i)z+(2+i)=(z-1)(z-2-i),
$$
because the two roots sum to $3+i$ and multiply to $2+i$. Therefore
$$
\boxed{z=1,\qquad z=2+i.}
$$