Let
A = the amplitude of vibration
k = the spring constant
m = the mass of the object
The displacement at time, t, is of the form
x(t) = A cos(ωt)
where
ω = the circular frequency.
The velocity is
v(t) = -ωA sin(ωt)
The maximum velocity occurs when the sin function is either 1 or -1.
Therefore

Therefore

The KE (kinetic energy) is given by

The PE (potential energy) is given by

When the KE and PE are equal, then

For the oscillating spring,

Therefore

Answer: