Hi! I have some questions from a study guide in my physics class, and they give me the answer, but I have to show how to get the answer. I did most of them, but need help with these. Here is problem #2:

Suppose the spring in a pinball machine has a spring contant of k=400 N/m. How much work will it do if compressed by x=0.03 m? (0.18 J)

W=kx²/2