$\text{Im}(z)$ in equation I'm having trouble with this equation:
$$\text{Im}(-z+i) = (z+i)^2$$
After a bit of algebra i've gotten:
$$1-\text{Im}(z) = z^2 + 2iz - 1$$
But i have no clue where to go from here, how do i get rid of the "$\text{Im}$"?

Hint
Write $z=a+i~b$ in which $a$ and $b$ are real numbers. So $$Im(-z+i)=Im(-a+i(1-b))=1-b$$ 
Since John's answer came while I was typing, just continue the way he suggests (this is what I was about to write).
Continuation of my answer
The right hand side is $$(z+i)^2=(a+i(b+1))^2=a^2-(b+1)^2+2a(b+1)i$$ So the equation is $$1-b=a^2-(b+1)^2+2a(b+1)i$$ Now, the method consists in the identification of real and imaginary parts. This means that we have tox equations $$1-b=a^2+(b+1)^2$$ $$2a(b+1)=0$$ that is to say two equations for two unknowns $a$ and $b$.
I am sure that you can take from here.
