Can write $a^{\log_b(n)} = a^{\frac{\log_a(n)}{\log_a(b)}}$, and if you flip the a and b $$a^{\frac{\log_a(n)}{\log_a(b)}} = a^{\log_a(n)\log_b(a)}$$ $=n^{\log_b(a)}$
what rule was applied to allow the $\frac{\log_a(n)}{\log_a(b)}=\log_a(n)\log_b(a)$ by simply switching the places of a and b?
$$ \log_a(b) = \frac{\log_x b}{\log_x a} $$ for any $x > 0$ and $x \neq 1$. For example, $x = 11$.
Then $$ \frac{1}{\log_a(b)} = \frac{1}{\frac{\log_x b}{\log_x a}} = 1 \cdot \frac{\log_x a}{\log_x b} = \log_b(a) \text{,} $$ using that division by a fraction is multiplication by its reciprocal.