Answer
$x=5$
Work Step by Step
Note that:
$\frac{1}{125}=\frac{1}{5^3}=5^{-3}$
Write $\frac{1}{125}$ as $5^{-3}$ to obtain:
$5^{2-x}=5^{-3}$
RECALL:
If $a^x = a^y$, then $x=y$.
Use the rule above to obtain:
$\begin{array}{cccc}
\\&5^{2-x}&=&5^{-3}
\\&2-x&=&-3
\\&-x&=&-3-2
\\&-x&=&-5
\\&-1(-x)&=&-5(-1)
\\&x&=&5\end{array}$