Answer
See explanations.
Work Step by Step
Step 1. Using the given equation $\frac{1}{2}m(v^2-v_0^2)=\frac{1}{2}k(x_0^2-x^2)$, take the derivative with respect to $t$ to get $m(2v\frac{dv}{dt}-0)=k(0-2x\frac{dx}{dt})$.
Step 2. Using the relation $\frac{dx}{dt}=v$, we get $2mv\frac{dv}{dt}=-2kxv$.
Step 3. As $v\ne0$, we get $m\frac{dv}{dt}=-kx$.