So, the solution: \begin{align*} & & \cos z &= 6 \\ &\Rightarrow & \frac{1}{2}(e^{iz} + e^{-iz}) &= 6 \\ &\Rightarrow & e^{iz} + e^{-iz} &= 12 \end{align*} multiplying everything by $e^{iz}$, we get: $(e^{iz})^2 -12e^{iz} +1$. COntinuing the displayed development, \begin{align*} &\Rightarrow & e^{iz} &= \frac{1}{2}\left(12 \pm \sqrt{12^2 - 4} \right) \\ & & &= 6 \pm \sqrt{35} \\ & & e^{iz} &= e^{ln(6 \pm \sqrt{35})} \end{align*} (this part I know thechnically, but I don't know the reason why it is so) \begin{align*} & & iz &= ln(6 \pm \sqrt{35}) \Rightarrow ln(6 \pm \sqrt{35}) \\ & & &= ln|\sqrt{36 + 35}| + i(0 + 2\pi k) \\ & & &= ln|\sqrt{71}| +i2\pi k \\ & & z &= 2\pi k -i\ln|\sqrt{71}| \end{align*}
First this seems to be incorrect as maybe the modulus has two distinct values, because it's all reall part, so in that case:
$$1) iz = ln(6 \pm \sqrt{35}) = \ln|71 \pm 12\sqrt{35}| + i 2\pi k \\ z = 2 \pi k - i \ln |71 \pm \sqrt{35}|, \ \ k \in Z$$
So, if it's not correct, where is my mistake? Also why is it so that $e^{iz} = e^{ln(6 \pm \sqrt{35})}?$
I agree with what you wrote until you get $e^{iz}=6\pm\sqrt{35}$. Now, what you deduce from this is that$$iz=\log\left(6\pm\sqrt{35}\right)+2k\pi i,$$for some integer $k$. Multiplying both sides by $i$, you get that$$z=-2k\pi+i\log\left(6\pm\sqrt{35}\right),$$again, for some integer $k$.