Now equating real parts (and keeping in mind that $a$ and $b$ are real), we see that $\sin(a)=\cos(a)$. (This also use the fact that $\cosh(b)$ cannot be $0$.) So $a=\frac{\pi}{4}+k\pi$ for some $k\in\mathbb{Z}$.

Now we can divide across by $\sin(a)$ or $\cos(a)$. (Remember, we have deduced they are equal.)
$$\begin{align}
\implies&&\cosh(b)+i\sinh(b)&=\cosh(b)-i\sinh(b)\\
\implies&&i\sinh(b)&=-i\sinh(b)\\
\implies&&\sinh(b)&=-\sinh(b)\\
\implies&&\sinh(b)&=0\\
\end{align}$$
There is only one real solution for $b$: $b=0$.

$$\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}$$
Then, $$\sin(z)=\cos(z)\implies \frac{e^{iz}-e^{-iz}}{2i}=\frac{e^{iz}+e^{-iz}}{2}$$ Now let $e^{iz}=t$ ,then $e^{-iz}=1/t$ and you will get a quadratic equation,solve for it and back substitute it to get $z$.

The equation becomes $t^2=\frac{1+i}{1-i}=i=e^{i(\pi/2+2k\pi)}\implies t=e^{i(\pi/4+k\pi)},e^{i(5\pi/4+k\pi)}$. Equating it with $e^{iz}$ we get $z=\pi/4+k\pi$