The total energy (T.E.) in SHM is the sum of kinetic energy (K.E.) and potential energy (P.E.):
\[T.E. = K.E. + P.E.\]
Substitute $K.E. = 0.5 \, \text{J}$ and $P.E. = 0.4 \, \text{J}$:
\[T.E. = 0.5 + 0.4 = 0.9 \, \text{J}.\]
The total energy is also given by:
\[T.E. = \frac{1}{2} m \omega^2 A^2,\]
where:
\[\omega = 2 \pi f \quad \text{and} \quad f = \frac{25}{\pi}.\]
Substitute $\omega$:
\[\omega = 2 \pi \times \frac{25}{\pi} = 50 \, \text{rad/s}.\]
Substitute $T.E. = 0.9 \, \text{J}$, $m = 0.2 \, \text{kg}$, $\omega = 50 \, \text{rad/s}$:
\[0.9 = \frac{1}{2} \times 0.2 \times (50)^2 \times A^2.\]
Simplify:
\[0.9 = 0.1\times 2500 \times A^2 \implies A^2 = \frac{0.9}{2500} = 0.0036.\]
Solve for $A$:
\[A = \sqrt{0.0036} = 0.06 \, \text{m}.\]
Convert to centimeters:
\[A = 6 \, \text{cm}.\]
Thus, the amplitude of oscillation is:
\[A = 6 \, \text{cm}.\]