A smooth sphere A of mass 3m moving on a smooth horizontal table with speed 4u, impiges directly on another smooth sphere B of mass 2m, moving with speed u in the opposite direction to A. The coefficient of restitution between A and B is e. 
(a) Find the impulse exerted on A by the impact.
At the moment of the impact, the line of centres of the spheres is perpendicular to a vertical wall which is at a distance x from the point of collision and nearer to B than to A, and B subsequently collides with the wall.
(b) Find in terms of x, the distance of A from the wall at the instant B hits the wall.