Answer
The ratio of the kinetic energy just after impact to the kinetic energy just before impact is $\frac{1}{3}$
Work Step by Step
Let $M$ be the mass of bob A.
Then $2M$ is the mass of bob B.
Let $v_A$ be bob A's speed just before the collision. We can use conservation of momentum to find the speed $v_f$ just after the collision:
$m_f~v_f = m_A~v_A$
$(M+2M)~v_f = M~v_A$
$v_f = \frac{v_A}{3}$
We can find the initial kinetic energy:
$KE_0 = \frac{1}{2}Mv_A^2$
We can find the final kinetic energy:
$KE_f = \frac{1}{2}(3M)(\frac{v_A}{3})^2$
$KE_f = \frac{1}{3}\times \frac{1}{2}Mv_A^2$
$KE_f = \frac{1}{3}\times KE_0$
The ratio of the kinetic energy just after impact to the kinetic energy just before impact is $\frac{1}{3}$.