
I don't understand on the second last line how my professor goes from $2^{log_3(n)} = n^{log_3(2)}$ how is that relation formed?

I don't understand on the second last line how my professor goes from $2^{log_3(n)} = n^{log_3(2)}$ how is that relation formed?
Note that $\log_b a = \frac{\log b}{\log a}$, so
$$2^{\log_3 n} = 2^{\frac{\log n}{\log 3}} = \exp\left(\log 2 \cdot \frac{\log n}{\log 3}\right) = \exp \left(\log n \cdot\frac{\log 2}{\log 3}\right) = n^{\frac{\log 2}{\log 3}} = n^{\log_3 2}.$$