Three balls A,B and C of masses 2kg, 4kg and 8kg, respectively, move along the same straight line and in the same direction, with velocities 4m/s, 1m/s, 3/4m/s. If A collides with B and subsequently B collides with C, find the velocity of ball A and ball B after collision, taking the coefficient of restitution as unity.

