Since the momentum is conserved, we can equate the momentum of the baseball to that of the tennis ball:
momentum of baseball = momentum of tennis ball
mv_baseball = mv_tennis
where
m_baseball = 0.3 kg (mass of baseball)
m_tennis = 0.5 kg (mass of tennis ball)
v_baseball = 21 m/s (velocity of baseball, given)
Solving for v_tennis, we get:
v_tennis = (m_baseball / m_tennis) * v_baseball
v_tennis = (0.3 / 0.5) * 21
v_tennis = 12.6 m/s
Therefore, the velocity of the tennis ball is 12.6 m/s.