two object connected by a spring : momentum/energy topic Here is my question below:
Question

Two objects A and B, connected by a light elastic spring with elastic constant 5.0 N/m, are initially at rest.
The mass A is 2.0 kg and the mass B is 1.0 kg.
Object B is hit by a hammer and moves away from A with an initial velocity of 10.0 m/s.
a) Find the velocity of object A when object B is momentarily at rest.
b) Find the extension of the spring when object B is momentarily at rest.

Here is my approach for this:
I use basic conservation of momentum(this is a 1-D problem).
The before momentum equation, object A is zero, hence we just have momentum of B at the instant it is hit by the hammer.
The after state momentum equation is just object A, while B is now zero.
Solving for the velocity of A gives v= 5m/s.
SO that is how part a) is answered.
For part b) I use energy equations,
I set kinetic energy of A, from the after state equal to the potential energy Hooke's law:
So (1/2)mv^2 =  (1/2)k(deltaX)^2
Solving for deltaX gives,
deltaX = sqrt(10) = 3.16 meters.
So my problem with my solutions, is that I feel that the amount of stretch of the spring does not feel right, I feel this is too large an amount.
I am hoping someone can take a look and let me know if there is a problem with my solution.
Regards.
 A: Your first part was correct; but for the second part, you have to equate the energy of A plus the stored energy in the spring to the energy of B (because you start with no energy in the spring, and all the energy as kinetic energy in B).
So the expression for the stored energy is $E_\mathrm{spring}=\frac12 k x^2 = \frac12 m_b v_b^2 - \frac12 m_a v_a^2$. 
In terms of momentum, it becomes
$$E_\mathrm{spring}=\frac12 k x^2=\frac{p^2}{2}\left(\frac{1}{m_b}-\frac{1}{m_a}\right)$$
That's a positive numbe. Note that if the mass of $b$ Is greater than the mass of $a$, then $b$ never stops (which is why you can get the apparent negative square root). Either way, for the conditions given the value of the extension is rather large. 
It's good that you said "the answer doesn't feel right". That's an important step in solving real-world problems. Unfortunately, since the KE of A is exactly half the KE of B, getting the expression right still gets you to the "slightly unphysical" answer. That is because the spring constant is really very small (it will stretch a full meter when you hang a 500 gram mass from it).
