(a)
By momentum conservation
`2mv=(m+2m)VimpliesV=(2v)/(3)`
K.E. of combined block
`=1/2(2m+m)V^2=(3m)/(2)((2v)/(3))^2=2/3mv^2`
Let A be the amplitude
`2/3mv^2=1/2kA^2impliesA=vsqrt((4m)/(3k))`
(b) The block reaches to spring with speed v. The block compresses the spring by distance x such that `1/2mv^2=1/2kx^2`. Now block moves toward left, when it leaves contact with spring, its speed is v. The time for which block is in contact with spring `t_1=T/2=pisqrt(m/k)`.
Time taken by block to move from left wall to spring and then spring to left wall
`t_2=L/v+L/v=(2L)/(v)`
Thus block undergoes periodic motion with time period
`t_1+t_2=pisqrt(m/k)+(2L)/(v)`.