Answer
The hammer must move at $v=4.17m/s$
Work Step by Step
The hammer moves with velocity $v$. Its KE is $$KE_h=\frac{1}{2}mv^2=4.5v^2$$
25% of $KE_h$ is used to bring the metal piece upward, so the initial KE of the metal piece is $KE_{m, 0}=\frac{1}{4}\times4.5v^2=1.125v^2$
We assume the principle of energy conservation applies here, so $$E_f-E_0=0$$ $$KE_{m, f}+PE_{m, f}-KE_{m, 0}-PE_{m, 0}=0$$
At the ground, the metal piece has zero PE, so $PE_{m, 0}=0$
"The bell barely rings" means the metal piece's velocity reaches 0 just as it reaches the bell located 5m above, which is our final point. So $KE_{m, f}=0$
Therefore, $PE_{m, f}-KE_{m, 0}=0$ $$mgh_f-1.125v^2=0$$
We have $m=0.4kg$ and $h_f=5m$, so $$1.125v^2=19.6$$ $$v=4.17m/s$$ which is the speed the hammer must move at.