Physics
posted by Khalifa .
A bullet of mass 45 g is fired at a speed of 220 m/s into a 5.0kg sandbag hanging from a string from the ceiling. The sandbag absorbs the bullet and begins to swing. To what maximum vertical height will it rise? Hint: Energy is not conserved as the bullet enters the bag but is conserved after the bullet comes to rest in the bag and the bag is swinging upward

v1'=((m1m2)/(m1+m2))v1 for the bullet =176ms^1
And for the sandbag at rest
v2'=((2m1)/(m1+m2))v1 =396ms^1
The bullet is conserved after the bullet comes to rest in the bag.
Hence Mgh= 1/2mv^2.
I got stuck here what is going to be the value of M, is it sum of the two masses. and value of v as well.
And i hope the above is collect.
Thanks 
mv=(m+M)u
u=mv/(m+M)=0.045•220/(0.045+5)=1.96 m/s
(m+M)u²/2=(m+M)gh
h= u²/2g=1.96²/2•9.8=0.196 m