What work is done by a force 20n on a spring when the application of this force causes an extension 10cm in the spring?

F = kx

W = 1/2 kx^2 = 1/2 (F/x) x^2 = 1/2 Fx = 1/2 * 20 * 0.1 = 1 J