Re: Your Work
If you're going to solve this equation by factoring, etc., you do not want to factor and set equal to a non-zero number. That is, doing something like:
$$(z+1)(z+1) = -1$$
does not point you in the right direction, because you can only find roots by factoring when you have the equation set equal to zero.
Also, please see Chris K's comments about the other parts of your algebra... in general, $(x+y)^2 \ne x^2 + y^2$. That is, $(a+i)^2 \ne a^2 + i^2$.
Re: The Problem Statement
Because this is a quadratic with real coefficients, we know by the Fundamental Theorem of Algebra that it will have exactly $2$ solutions, where complex solutions occur in conjugate pairs.
We are given that the two solutions are $a+i$ and $b-i$. Since these are conjugate pairs, then $a=b$.
So, our two solutions are $a+i$ and $a-i$. Having one variable makes things simpler.
We also know that
(z - (a+i))(z-(a-i)) &=z^2 + \left(-(a+i) - (a-i)\right)z + (a+i)(a-i) \\
Equating coefficients, we find that $\left(-(a+i) - (a-i)\right) = -2$ and $(a+i)(a-i) = 2$.
Can you take it from there?