A particle A of mass m moving on a smooth horizontal surface collides with a stationary particle B of mass 2m directly,
situated at a distance d from a wall. The coefficient of restitution
between A and B and between B and the wall is e = 1/4. Calculate the distance from the wall where they collide again. Assume that the entire motion takes place along a straight line perpendicular to the wall.