The period doesn't change. T = 2 pi / omega = 2 pi sqrt (k/m) On the earth, on the moon, in deep space, wherever. If you showed me your differential equations and how you solved them, I could show you your mistake. Now if you have a pendulum (omega = sqrt (g/l) ), then that DOES depend on the gravitational acceleration. So your grandfather clock will run slow on the moon, but a spring-based clock works okay. ky=mg The forces are only balanced at equilibrium--that is not generally true. That equation lets you solve for the equilibrium dispacement (which is dependent on gravity). Then when you do the math, you solve for m/x. They don't ask you for m/x. They ask you for the period, T. This problem doesn't require any math other than the observation that the period depends only on the spring and the mass, not on g.