A 4.1 kg block is attached to a spring with a force constant of 450N/m , as shown in the figure
Find the work done by the spring on the block as the block moves from A to B along paths 1 and 2.
1 Answer

Path is immaterial in this problem.
Energy added to spring is E = ½kx² = ½ 450N/m (0.02m)² = 0.09 J
so the work done by the spring on the block is 0.09 J.