I'm having trouble understanding where the $-1+i$ term comes from in the following line:
$\dfrac{e^{3z} - e^{-3z}}{e^{3z} + e^{-3z}} = 1 + 2i \implies e^{6z} = -1 + i$.
I've tried the following:
$$\begin{align*}
\dfrac{e^{3z} - e^{-3z}}{e^{3z} + e^{-3z}} &= 1 + 2i\\
\dfrac{e^{6z} - 1}{e^{6z} + 1} &= 1 + 2i\\
e^{6z} - 1 &= (1 + 2i)(e^{6z} + 1)\\
e^{6z} &= (1 + 2i)(e^{6z} + 1) + 1
\end{align*}$$
How do we get from $(1 + 2i)(e^{6z} + 1) + 1$ to $-1 + i$? Have I done something wrong somewhere in my calculation?