Validity of the change-of-base formula for all bases

You can use whatever basis: the equality $3^x=10$ is equivalent to $$ \log_a 3^x=\log_a 10 $$ for any $a>0$, $a\ne1$. Since $\log_a 3^x=x\log_a 3$, we get $$ x=\frac{\log_a 10}{\log_a 3} $$ so you see that the final result is independent of the base.

You can get the change of base formula by considering $b^c=k$ that says $c=\log_b k$; but we also have $c\log_a b=\log_a k$ and therefore $$ \log_b k=\frac{\log_a k}{\log_a b} $$ In the case of $b=3$, $k=10$ and $a=e$, you get $$ \log_3 10=\frac{\ln 10}{\ln 3} $$


Possibly the best way to see this is to write a change to an arbitrary base instead of choosing either $\log_{10}$ or $\ln$ initially. (There is already an answer that does that.) But I think it's also noteworthy that the change-of-base formula itself provides an easy derivation of the fact that $$\frac{\log10}{\log3}=\frac{\ln10}{\ln3}.$$

Starting with $\frac{\ln10}{\ln3}$ (for example), simply apply the formula to change the base from $e$ to $10$ on both the numerator and denominator: \begin{align} \ln10 &= \log_e 10 = \frac{\log_{10} 10}{\log_{10} e}, \\ \ln3 &= \log_e 3 = \frac{\log_{10} 3}{\log_{10} e}, \\ \frac{\ln10}{\ln3} &= \frac{\left( \frac{\log_{10} 10}{\log_{10} e} \right)} {\left(\frac{\log_{10} 3}{\log_{10} e} \right)} \end{align} Multiply both the numerator and denominator of the right-hand side of the last equation by $log_{10} e$, and we find that $$\frac{\ln10}{\ln3} = \frac{\log_{10} 10}{\log_{10} 3} $$

In other words, every time we change the base of both the numerator and denominator from base $b$ to base $c$ simultaneously, we divide both the numerator and denominator by $\log_c b$, and those two operations cancel each other out.