6. Suppose that $\log _{a} 125=\log _{5} 3$ and $\log _{b} 16=\log _{4} 7$. Find the value of $a^{\left(\log _{5} 3\right)^{2}}-b^{\left(\log _{4} 7\right)^{2}}$.
Answer: -22
Solution: Note that $a^{\log _{5} 3}=125$ and $b^{\log _{4} 7}=16$. Thus
$$
a^{\left(\log _{5} 3\right)^{2}}-b^{\left(\log _{4} 7\right)^{2}}=\left(a^{\log _{5} 3}\right)^{\log _{5} 3}-\left(b^{\log _{4} 7}\right)^{\log _{4} 7}=125^{\log _{5} 3}-16^{\log _{4} 7}=3^{3}-7^{2}=-22
$$