Apply conservation of linear momentum principle in this problem.
Let the velocity after first explosion be "u". and after second explosion be "v".
Initially the cannon and the shell were at rest.After explosion the mass of cannon will decrease by "M" ie it will become 49M
50M*0 = 200*M+ 49M* u
solving u = -200/49 (negative sign indicates opp to velocity of shell)
Again after 2 nd explosion the mass of cannon again decreases by "M" ie it becomes 48M.
49M*u = 200*M + 48M*v
substituting value of u and solving we get v = -25/3 m/sec
i.e after 2nd explosion the cannon recoils with a speed of 25/3 m/sec.