Compression of spring with moving blocks

Jan 2019
Got another one, hope it isn't as big an oversight.

block 1 follows block 2 on a frictionless surface. Block 2 has a spring attached behind it with spring constant=k=1100N/m.

Block1-> m1=4kg v1=20m/s
Block2-> m2=10.0kg v2=6m/s

The collision between the two is totally inelastic. And after the collision block1 and block2 move with v3=10m/s

How much does the spring compress?

I tried finding the kinetic energy from block1 and then the kinetic energy after the collision. I thought the sum would give the amount of potential energy stored in the spring. And finding the distance with Epot=0.5*kx^2
The way I find the kinetic energy from block one is taking the relative velocity between the blocks-> 20m/s-6m/s=14m/s.
Then Ekin=0.54kg14^2
And Ekin2=0.5(m1+m2)(10m/s)^2
then Ekin2-Ekin=-308J
Solving for x with Epot=308J gives me a distance of 0.75m

The answer is supposedly 0.71m
Aug 2010
The problem is that this collision is inelastic so energy is not conserved. The collision is, in fact, totally inelastic so that the two blocks travel as one after the collision. The problem says that the two blocks, total mass 14 kg, move together after the collision with speed 10 m/s.