Step 1: Assign directions and velocities.
Let the initial direction of ball \(A\) be positive.
Mass of ball \(A\):
\[
m_1=M
\]
Mass of ball \(B\):
\[
m_2=2M
\]
Initial velocity of ball \(A\):
\[
u_1=150\;\text{m s}^{-1}
\]
Since ball \(B\) is moving in the opposite direction,
\[
u_2=-v
\]
After collision, ball \(A\) comes to rest, so
\[
v_1=0
\]
Let final velocity of ball \(B\) be \(v_2\).
Step 2: Use coefficient of restitution.
Coefficient of restitution is
\[
e=1
\]
Using the formula,
\[
e=\frac{v_2-v_1}{u_1-u_2}
\]
Substitute the known values:
\[
1=\frac{v_2-0}{150-(-v)}
\]
\[
v_2=150+v
\]
Step 3: Apply conservation of linear momentum.
Initial momentum is
\[
M(150)+2M(-v)
\]
\[
=150M-2Mv
\]
Final momentum is
\[
M(0)+2M(v_2)
\]
\[
=2Mv_2
\]
By conservation of momentum,
\[
150M-2Mv=2Mv_2
\]
Dividing by \(M\),
\[
150-2v=2v_2
\]
Substitute
\[
v_2=150+v
\]
So,
\[
150-2v=2(150+v)
\]
\[
150-2v=300+2v
\]
\[
-4v=150
\]
\[
v=-37.5
\]
Since \(v\) represents speed, we take magnitude:
\[
v=37.5\;\text{m s}^{-1}
\]
Step 4: Final conclusion.
Hence, the speed of ball \(B\) before collision is
\[
\boxed{37.5\;\text{m s}^{-1}}
\]