5. The solution to the equation $8^{\log _{6}\left(x^{2}-7 x+15\right)}=5^{\log _{6} 8}$ is
5. $x=1$ or $x=5$.

From $5^{\log _{6} 8}=8^{\log _{6} 5}$, then $\log _{6}\left(x^{2}-7 x+15\right)=\log _{6} 5$, which means $x^{2}-7 x+15=5$, thus $x=1$ or 5.