Let the required speed to V.
As theer is a sudden change in the speed of the block, the tension must change by a large amount during the collision.
Let N=magnitude of the contact force between the particle and the pan
`T=tension in the string,
Consider the impulse imparted to the particle. The force in N in upward direction and the impulses is `intN dt.` This should be equal to the change in its momentum.
Thus, `intN dt=mv-mV.`.............i
Similarly considering the impulse imparted to the pan,
`int(N-T)dt=mV`........ii
and that to the block
`intT dt=mV`..............iii
Adding ii and iii
`intN dt=2mV`.
Comparing with i
`mv-mV=2mV`
`V=v/3`