In stretching or compressing the spring by a distance of x (in meters), one performs 1/2 (350 N/m) x² of work on the spring, or equivalently the spring performs -1/2 (350 N/m) x² of work on the door. This work is negative since the restoring force of the spring opposes the force used to stretch or compress the spring.
Then when the spring is allowed to relax, it performs 1/2 (350 N/m) x² of work to return it to equilibrium position. The force from the spring acts in the direction of the door's motion, so the work done is positive once more.
Now, the work done on the door …
• … to return it from 85.0 cm = 0.850 m to equilibrium is
1/2 (350 N/m) (0.850 m)² = 126.4375 J
• … to return it from 5.0 cm = 0.050 m to equilibrium is
1/2 (350 N/m) (0.050 m)² = 0.4375 J
• … to relax from 85.0 cm to 5.0 cm from equilibrium is
126.4375 J - 0.4375 J = 126 J