Given data:
The spring's rest length is x=30 cm.
The compressed length of spring is x'=10 cm.
The displacement in the spring will be,
[tex]\begin{gathered} \Delta x=x-x^{\prime} \\ \Delta x=30\text{ cm}-10\text{ cm} \\ \Delta x=20\text{ cm}\times\frac{1\text{ m}}{100\text{ cm}} \\ \Delta x=0.2\text{ m} \end{gathered}[/tex]
The slope of the given graph will be equal to the spring stiffness that can be calculated as,
[tex]\begin{gathered} k=\frac{60-0}{0.3-0.2} \\ k=600\text{ N/m} \end{gathered}[/tex]
The energy observed by the spring will be equal to the kinetic energy of the block. We can equate both to calculated the kinetic energy of the block,
[tex]\begin{gathered} \text{Kinetic energy=Spring energy} \\ KE=\frac{1}{2}k\Delta x^2 \\ KE=\frac{1}{2}(600)(0.2)^2 \\ KE=12\text{ J} \\ \\ \end{gathered}[/tex]
Thus, the kinetic energy of the block is 12 J.