Answer
The solution set is $\left\{2, 4\right\}$.
Work Step by Step
To solve the given equation, make the two sides have the same base.
Note that $125=5^3$, so the given equation is equivalent to:
$5^{x^2+8}=(5^3)^{2x}$
Use the rule $(a^m)^n = a^{mn}$ to obtain:
$5^{x^2+8} = 5^{3(2x)}
\\5^{x^2+8}=5^{6x}$
Use the rule $a^m=a^n \longrightarrow m=n$ to obtain:
$x^2+8=6x$
Subtract $6x$ to both sides of the equation to obtain:
$\begin{array}{ccc}
&x^2+8-6x &= &6x-6x
\\&x^2-6x+8 &= &0
\end{array}$
Factor the trinomial to obtain:
$(x-4)(x-2)=0$
Equate each factor to zero, and then solve each equation to obtain:
$\begin{array}{ccc}
&x-4=0 &\text{ or } &x-2-0
\\&x=4 &\text{ or } &x=2
\end{array}$
Thus, the solution set is $\left\{2, 4\right\}$.