The elastic potential energy of a spring is given by

where k is the spring's constant and x is the displacement with respect to the relaxed position of the spring.
The work done by the spring is the negative of the potential energy difference between the final and initial condition of the spring:

In our problem, initially the spring is uncompressed, so

. Therefore, the work done by the spring when it is compressed until

is

And this value is actually negative, because the box is responsible for the spring's compression, so the work is done by the box.
In ur explanation make sure to use the terms
science hasnt figured it out yet
Here refrigerator removes 55 kcal heat from freezer
Refrigerator releases 73.5 kcal heat to surrounding
So here we can use energy conservation principle by II Law of thermodynamics
the law says that

here we know that
= heat released to the surrounding
= heat absorbed from freezer
W = work done by the compressor
now using above equation we can write



So here compressor has to do 18.5 k cal work on it