Respuesta :

 - (spring constant) (new length of spring - original length of spring) = Force applied to spring.
that is
-kx=F

Did you only have how far the cart traveled? No mass or acceleration or speed or time taken?