HELLO,
This is a question from simple use of conservation of energy,
Here, Initial energy = Potential energy stored in compressed spring = \(\frac{kx^2}{2}\), where k= spring constant of spring and x is compressed length.
Final energy = Kinetic energy of the ball = \(\frac{mv^2}{2}\), where m is the mass of the ball and \(v \) is velocity of the ball.
Applying energy conservation,
Initial energy = Final energy
\(\frac{kx^2}{2} = \frac{mv^2}{2}\)
\(kx^2 = mv^2 \)
Now, putting the value of \(k=9000N/m , x = 4cm = 0.04m , m=16g=0.016kg\) we get,
\(v^2 = 900 m^2/s^2 \)
\(v=30m/s\)
I HOPE YOU WILL UNDERSTAND.