What is the solution of $\sin z=\cosh 4$? What is the solution of $\sin z=\cosh 4$?
By putting $z=x+iy$ I managed to find that the real part of $z$ is $x= \frac \pi 2+2n\pi $, but the imaginary part is contradictory giving negative value of $\cosh x$.
The answer is given to be $\frac \pi 2+2n\pi \pm \cosh 4$.

Well, $\cosh 4$ is just a number, so we apply inverse functions...  \begin{align*}
    \sin z &= \cosh 4 \\
    z = \sin^{-1} \cosh 4 + 2\pi k &\text{ or } z = \pi - \sin^{-1} \cosh 4 + 2 \pi k, \text{ for any integer $k$}.
\end{align*}  Suppose we already know $\sin^{-1}\cosh 4 = \frac{\pi}{2} - 4\mathrm{i}$.  Then $$
    z = \frac{\pi}{2} - 4\mathrm{i} + 2\pi k \text{ or } z = \frac{\pi}{2} + 4\mathrm{i} + 2\pi k, \text{ for any integer $k$}.
$$
We could perhaps simplify this to $z = \frac{\pi}{2} \pm 4\mathrm{i} + 2\pi k, \text{ for any integer $k$}$.  This is as close as I can get any answer to the form you gave (since $\cosh 4 = 27.308\dots \neq 4\mathrm{i}$).
