Answer
Work done by the spring = $3.78 J$
Work Step by Step
First, we have to find a value for the spring contant $k$,
Using, $$F= kx$$ $$530 = k*0.018$$ $$k = 29444.44 N/m$$
After dog jumped on to the shoulder, the total compression of the spring $y$,
$$F = ky$$ $$y = (530 + 180)/29444.44 $$ $$y = 0.0241 m $$
Work done (W) = final energy in the spring - initial energy
$energy (E) = 0.5*k*x^{2}$
$$W = 0.5*29444.44*0.0241^{2} - 0.5*29444.44*0.0180^{2} $$ $$W = 3.78 J$$