If I remember correctly (from my studies long time ago) the layers are from the outer to the center:
SiAl : Silicon-Aluminum
SiMa : Silicon-Magnesium (although should be Mg)
NiFe : Nickel-Iron
The SiMa layer should have the lightest elements (Magnesium is lighter than Aluminum)
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.