Answer
$(a)\space 0.98\space m$
$(b)\space 3.9\space m/s$
Work Step by Step
Please see the attached image below.
Let's take,
the speed of the together of cars after collision = V
Spring constant (K) = 0.32 MN/m
Compression of the spring = x
(a) Here we use the principle of conservation of momentum.
$ m_{1}u_{1}+m_{2}u_{2}=m_{1}V_{1}+m_{2}V_{2}$
$\rightarrow 9400\space kg\times8.5\space m/s+0= 20400\space kg V$
$\space \space \space\space \space \space\space \space \space3.9\space m/s=V$
Now we apply the conservation of mechanical energy.
Initial mechanical energy = Final mechanical energy
$\frac{1}{2}mV^{2}=\frac{1}{2}kx^{2}$
$20400kg\times(3.9m/s)^{2}= 0.32\times10^{6}N/m\times x^{2}$
$0.97\space m^{2}=x^{2}$
$0.98m=x$
(a) Maximum compression = 0.98 m
(b) Speed of the two cars = 3.9 m/s