Answer
(a) $k = 60.4~N/m$
(b) $x(t) = (12.0~cm)~cos(6.00\pi~t)$
Work Step by Step
(a) We can find the spring constant $k$:
$\omega = 2\pi~f$
$\sqrt{\frac{k}{m}} = 2\pi~f$
$k = (2\pi~f)^2~m$
$k = (2\pi)^2~(3.00~Hz)^2~(0.170~kg)$
$k = 60.4~N/m$
(b) We can find the equation for the position as a function of time:
$x(t) = A~cos(\omega~t)$
$x(t) = A~cos(2\pi~f~t)$
$x(t) = (12.0~cm)~cos[(2\pi)~(3.00~s)~t)]$
$x(t) = (12.0~cm)~cos(6.00\pi~t)$