Step 1: Apply conservation of momentum for bullet and block \(M_1\).
Initially, bullet has momentum
\[
mv.
\]
Block \(M_1\) is initially at rest.
After the bullet embeds in \(M_1\), their combined mass is
\[
M_1+m.
\]
Let their common velocity be \(u\).
Using conservation of momentum,
\[
mv=(M_1+m)u.
\]
Therefore,
\[
u=\frac{mv}{M_1+m}.
\]
Step 2: Collision of \((M_1+m)\) with \(M_2\).
Now the combined body of mass
\[
M_1+m
\]
moving with velocity
\[
u
\]
collides with block \(M_2\), which is initially at rest.
For one-dimensional elastic collision, when a body of mass \(m_1\) moving with velocity \(u\) collides with a stationary body of mass \(m_2\), the velocity of the second body after collision is
\[
v_2=\frac{2m_1u}{m_1+m_2}.
\]
Here,
\[
m_1=M_1+m
\]
and
\[
m_2=M_2.
\]
So,
\[
v_2=\frac{2(M_1+m)u}{M_1+m+M_2}.
\]
Step 3: Substitute the value of \(u\).
Since
\[
u=\frac{mv}{M_1+m},
\]
we get
\[
v_2=\frac{2(M_1+m)}{M_1+m+M_2}\cdot \frac{mv}{M_1+m}.
\]
Canceling \(M_1+m\),
\[
v_2=\frac{2mv}{M_1+M_2+m}.
\]
Step 4: Final conclusion.
Hence, the velocity of \(M_2\) after collision is
\[
\boxed{\frac{2mv}{M_1+M_2+m}}
\]
Therefore, the correct option is
\[
\boxed{(1)}
\]