Smooth spheres $A$ and $B$, of masses $2m$ and $m$, lie on a smooth horizontal surface. Sphere $A$ moves with speed $u$ and collides directly with stationary sphere $B$. The coefficient of restitution is $\tfrac23$.
(i) Find their velocities after the collision. [4]
Sphere $B$ is initially a distance $d$ from a fixed vertical wall. It strikes the wall, whose coefficient of restitution is $\tfrac12$, and then collides with $A$ again.
(ii) Find the time between the first and second collisions of the spheres. [5]