A 3.8 kg toy car at rest on a horizontal surface is accelerated by a spring to 5.4 m/s in a distance of 5.9 cm. What is the spring constant of the spring?

You cant use F=kx, because the force is not constant.

energy in the car: 1/2 mv^2

energy in the spring: 1/2 k x^2
set them equal, solve for k. change cm to meters