(* y-axis is directed up *)
g = 9.8;
h = 2;
vbi= -(Sqrt[2 g h]);
mb= 0.06;
vBi= (Sqrt[2 g h]);
mB = 0.6;
Solve[{mb vbi + mB vBi == mb vbf + mB vBf, vbi + vbf == vBi + vBf}, {vBf, vbf}]
Print["Without the basket ball: vbf = ", -vbi]