Step 1: Understanding the oscillatory motion.
The periodic time of oscillation of a block attached to a spring is given by:
\[
T = 2\pi \sqrt{\frac{m}{k}}
\]
where \( m \) is the mass of the block and \( k \) is the spring constant.
Step 2: Relation between force and spring constant.
The force due to the spring is \( F = kx \), where \( x \) is the extension. Also, the weight of the block is \( mg \). So, at equilibrium:
\[
kx = mg \implies k = \frac{mg}{x}
\]
Step 3: Substituting the values.
Substitute the value of \( k \) into the formula for the time period:
\[
T = 2\pi \sqrt{\frac{m}{\frac{mg}{x}}} = 2\pi \sqrt{\frac{x}{g}}
\]
Step 4: Conclusion.
The periodic time of oscillation is \( 2\pi \sqrt{\frac{x}{g}} \), so the correct answer is (B).