Daniel B. answered 02/25/22
A retired computer professional to teach math, physics
Let
M = 0.1 kg be the mass of the block,
m = 0.05 kg be the mass of the clay ball,
k = 50 N/m be the spring constant,
g = 10 m/s² be gravitational acceleration,
A = 0.02 m be the amplitude of oscillation of the block without the clay ball (see the relevant question),
v (to be computed) be the speed of the block with the clay ball passing through equilibrium position.
At the moment the block gets attached to the clay ball, the spring is extended distance A.
Therefore the spring energy is
E = kA²/2
At the time the block with the clay ball pass through the equilibrium position,
the spring energy is 0, and all the original energy E got converted into kinetic energy
(M+m)v²/2
Therefore
(M+m)v²/2 = kA²/2
v = A√(k/(M+m))
Substituting actual numbers
v = 0.02√(50/0.15) = 0.36 m/s