My solution:
\begin{align*}
&\cos(z)=\frac{1}{2}(e^{iz}+e^{-iz})=3 \\
&(e^{iz}+e^{-iz}) = 6 \\
&e^{2iz}+1 =6e^{iz} \\
&e^{2iz}+1-6e^{iz} =0 \\
&e^{iz} = \frac{6\pm \sqrt{36-4}}{2}=3\pm 2\sqrt{2} \\
&iz=\log(3\pm 2\sqrt{2}) \\
&iz=\log(3\pm 2\sqrt{2})=\ln(3\pm 2\sqrt{2})+i2k\pi \qquad k\in \mathbb{Z} \\
&z = -i\ln(3\pm 2\sqrt{2})+2k\pi \qquad k \in \mathbb{Z}
\end{align*}
Please reformat: \cos, \sin , \ln, \log etc