(a) The work done by F in stretching the spring a distance x is
W = 1/2 (120 N/m) x ²
so F performs 250 J of work on the spring, then
250 J = 1/2 (120 N/m) x ² ==> x ² ≈ 4.17 m² ==> x ≈ 2.04 m
(b) In order for F to perform 250 J of work, its magnitude must be
F = (120 N/m) (2.04 m) ≈ 245 N