Final answer:
The work required to compress a spring is proportional to the square of the compression distance; therefore, compressing the spring twice as far requires four times the energy, making the answer 20 J.
Step-by-step explanation:
Work Done on a Spring
The work needed to compress a spring is proportional to the square of the compression distance, following Hooke's Law. If it takes 5.0 J of work to compress the spring to the lower setting, compressing it twice as far would require four times the work because the work done is proportional to the compression distance squared. Thus, the work for the higher setting would be 20 J (4 times 5.0 J).