You can use Cauchy's mean value theorem, but in fact that's kind of cheating, as this is how L' Hopital's rule is proved.
For every $x$ around 0 there exists by Cauchy's mean value theorem a $\vert \xi_x \vert \leq \vert x \vert$ such that
$$\frac{\ln(\cos(5x))}{\ln(\cos(7x))}
= \frac{\ln(\cos(5x)) - \ln(\cos(0))}{\ln(\cos(7x))- \ln(\cos(0))}
= \frac{\left( \frac{-5\sin(5\xi_x)}{\cos(5\xi_x)} \right)}{\left( \frac{-7\sin(7\xi_x)}{\cos(7\xi_x)} \right)}
= \frac{5}{7}\frac{\cos(7\xi_x)}{\cos(5\xi_x)}\cdot \frac{\sin(5\xi_x)}{\sin(7\xi_x)}.$$
As $\xi_x\rightarrow 0$ for $x\rightarrow 0$, we get (if the respective limits exist)
$$ \lim_{x\rightarrow 0} \frac{\ln(\cos(5x))}{\ln(\cos(7x))}
= \lim_{\xi \rightarrow 0} \frac{5}{7}\frac{\cos(7\xi_x)}{\cos(5\xi_x)}\cdot \frac{\sin(5\xi_x)}{\sin(7\xi_x)}
=\lim_{\xi \rightarrow 0} \frac{5}{7} \frac{\sin(5\xi_x)}{\sin(7\xi_x)}.$$
Repeating the argument for $\frac{\sin(5\xi_x)}{\sin(7\xi_x)}$ yields that the limit equals $\frac{25}{49}$.