Answer
a) $5.49$
b) $6.3$ cm
Work Step by Step
We know that $M=\log\frac{I}{S}$ and thus $10^M=\frac{I}{S}$
a) Hence, here if $I=31.25$, we have:
$M=\log\frac{31.25}{10^{-4}}\approx5.49$
b) Here $M=4.8$. Thus,
$I=S10^M=10^{-4}(10^{4.8})\approx6.3 $ cm