Answer:
120 m/s
Explanation:
First of all, we can find the speed of the cannon recoiling. In fact, when the cannon recoils with speed V', it compresses the spring and all its kinetic energy is converted into elastic potential energy of the spring. So we can write:

where
M = 240 kg is the mass of the cannon
V is the speed of recoil of the cannon
k = 2.0×10^4 N/m is the spring constant
x = 55 cm = 0.55 m is the compression of the spring
Solving for V',

Now we can apply instead the law of conservation of momentum to the cannon+cannonball system to find the velocity at which the cannonball is fired. Since the system is initially at rest, the initial momentum is zero, so we can write:
0=mv+MV'
where
m = 10 kg is the mass of the cannon ball
v is the velocity of the cannon ball
M = 240 kg is the mass of the cannon
V' = 5.0 m/s is the velocity of recoil of the cannon
Solving for v,

where the negative sign means the direction of the cannonball is opposite to that of the cannon. So, the cannonball is fired at a speed of 120 m/s.