Use the work-energy theorem: the total work done on the 0.80 kg block by the spring to make it come to a stop is equal to the change in the block's kinetic energy.
If we take the block's initial direction of motion to be positive, then the spring does negative work on the block, and
-1/2 k (0.11 m)² = 0 - 1/2 (0.80 kg) (2.2 m/s)²
Solve for the spring constant k :
k = (1/2 (0.80 kg) (2.2 m/s)²) / (1/2 (0.11 m)²) = 320 N/m
We can use the same equation as above to find the distance the 1.40 kg block would travel as it is slowed down by the same spring:
-1/2 (320 N/m) x ² = 0 - 1/2 (1.40 kg) (3.0 m/s)²
Solve for the displacement x :
x = √((1/2 (1.40 kg) (3.0 m/s)²) / (1/2 (320 N/m))) ≈ 0.20 m