For questions like these it's easier to first rewrite z as z=x+iy.
Once we plug this back into the original equation we get x-iy-i = 2ix-2y+1
Rearranging both sides to group together the real and imaginary terms we get (x+2y) - i(y+2x+1) = 1.
We can now equate the real and imaginary terms on the left hand and right hand side to get 2 simultaneous equations we can solve for. In this case they are x+2y=1 and y+2x+1 = 0.
Rewriting the first one as x = 1- 2y, we can plug this into the second equation to get y+2-4y+1=0 --> 3y=3 --> y=1.
From this we can derive x = 1 - 2(1) = -1.
Therefore the complex number z = -1 + i.