The labelled diagram of the situation is shown below
Recall the kinetic energy formula,
work done = 1/2mv^2
where
m is the mass
v is the velocity
Recall, work done = force x distance
Thus,
force x distance = 1/2mv^2
From the information given,
Force = 2000
distance = 0.1
m = 5
Thus,
2000 x 0.1 = 1/2 x 5 x v^2
200 = 2.5v^2
v^2 = 200/2.5 = 80
v = √80
v = 8.94 m/s
The ball will collide with the the crate with a velocity of 8.94. The velocity at which the crate will move is v2
We would apply the law of momentum.
Initial momentum before collision = final momentum after collision
m1u1 + m2u2 = m1v1 + m2v2
where
m1 and m2 are the masses of the ball and crate respectively
u1 and u2 are the initial velocities of the ball and crate respectively
v1 and v2 are the final velocities of the ball and crate respectively
From the information given,
m1 = 5
m2 = 31
u1 = 8.94
u2 = 0 (because it was stationary)
v1 = - 1.44(because it moved in the opposite direction
Thus,
5 x 8.94 + 3.1 x 0 = 5 x - 1.44 + 31 x v2
44.7 = - 7.2 + 31v2
31v2 = 44.7 + 7.2 = 51.9
v2 = 51.9/31
v2 = 1.67 m/s
This means that the velocity with which the crate will start moving is 1.67 m/s
With respect to springs, conservation of energy is expressed as
1/2kx^2 = 1/2mv^2
where
k is the spring constant
x is the compression of the spring
m is the mass of the crate
v is the velocity of the crate
From the information given,
k = 250
Thus,
1/2 x 250 x x^2 = 1/2 x 31 x 1.67^2
125x^2 = 43.22795
x^2 = 43.22795/125 = 0.3458236
x = √0.3458236
x = 0.59 m
The spring will compress by 0.59 m
Extra credit
With the presence of friction, the ball will exert lesser force on the crate and this would cause the compression of the spring to be reduced. The spring will stretch less.