A block of mass m lies on a horizontal frictionless surface and is attached to one end of a horizontal spring (spring constant k) whose other end is fixed. The block is initially at rest at the position where the spring is unstretched (x = 0) when a constant horizontal force in the positive direction of the x axis is applied to it. A plot of the resulting kinetic energy of the block versus its position x is given. The scale of the figure's vertical axis is set by Ks = 2.0 J and the scale of the figure's horizontal axis is set by xmax = 2.8 m.

(a) What is the magnitude of F?
(b) What is the value of k?

I think I definitely need to use F=-kx at some point, as well as W=Fd, but I don't know in what order.