A 1.2kg mass attached to a spring oscillates with an amplitude of 5.1 cm and a frequency of 1.2Hz. what is the energy of it's motion?

As I recall, U = 1/2 kA^2

where ω=√(k/m)
So that gives us
U = 1/2 mω^2 A^2 = 1/2 m(2πf)^2 A^2
and now just plug in your numbers

google the topic for many discussions and examples