Answer
Work required to compress $10cm$ is equal to $3J$
Work required to compress to $25cm$ is equal to $6.75J$
Work Step by Step
We are given the natural length of $40cm$, force required ($60N$), and distance of compression ($10cm$), and are asked to find the work to compress both by $10cm$ and to compress to $25cm$.
Before we can solve for any of these, we need to find the spring constant, for simplicity we convert centimeters into meters.
$60=k*(0.1)$
$k=600$
Now that we know the spring constant, we can now solve the two questions
To compress by $10cm$
$W=\int_{0}^{0.1}(600x)dx=3J$
To compress to $25cm$, we have to find the distance that it's compressed by
$40-25=15$
The spring is being compressed by 15cm
$W=\int_{0}^{0.15}(600x)dx=6.75J$