Studiot, the OP said "A spring with a force constant of 350 N/m". When he said the spring "is compressed 12 cm by a 3.0 kg mass", he clearly does not mean the spring and mass are in equilibrium that is, it is not the 3.0 kg mass alone that is compressing the mass because compressing the spring, with spring constant 350 N/m 12 cm= 0.12 m would result in a force of 350(0.12)= 42 N while a 3.0 kg mass has weight 3.0(9.81)= 29.43 N. When what ever additional force is holding that spring at 12 cm is released, there will be a force of 42 29.43= 12.57 Newtons on the mass.
The simplest way to answer this problem is to use "total energy". We can take the "0" point for potential energy to be at the 12 cm compression point. The mass is sitting there to begin with so its velocity and kinetic energy are 0. The total energy there is 0. Once the spring is released, it loses potential energy so the potential energy of the mass is negative. The change in potential energy of a mass, m, on a spring with spring constant k, with extension x, is mkx. The kinetic energy is (1/2)mv^2 so the total energy is mkx+ (1/2)mv^2. Since energy is conserved, we must have mkx+ (1/2)mv^2= 0. We can divide by m to get kx+ (1/2)v^2= 0 or v^2= 2kx. Set k= 350, x= 0.10 m, and solve for v.
