a 9.50-g bullet. moving horizontally with an initial speed vi , embeds itself in a 1.45-kg pendulum bob that is initially at rest. The length of the pendulum is L=0.745m. After the collision, the pendulum swings to one side and comes to rest when it has gained a vertical height of 12.4 cm. Find the initial speed of the bullet.

from the final height, the PE gained was

(m+M)gh (m is the bullet mass).

So the initial velocity of the bullet/block must be

1/2 (m+M)v^2=(m+M)gh or
V=sqrt(2gh)

Now the law of momentum conservation holds when the bullet hits the block

(m+M)V=mVi

(m+M)sqrt(2gh)=mVi

and solve for Vi

Thanx ,, but I got something equals to 239.51 m/s .. and I don't think it is right ..

I did it like this
1/2 ( 0.0095 + 1.45 ) sqrt ( 2*9.8*0.124) = 0.0095 vi

I got my mistake ,, thank you very much for the help :)

No I didn't get it right :S ,, I did it like this exactly

( 0.0095 + 1.45 ) sqrt ( 2*9.8*0.124) = 0.0095 vi

Thanks the answer was right, I related it to the small mass and it made sense ,, I submitted it , and it was right

239.51

239.51m/s