Two masses A and B of 3 kg and 2 kg are connected by a long inextensible string which passes over a massless and frictionless pulley. Initially the height of both the masses from the ground is same and equal to 1 metre. When the masses are released. Mass A hits the ground and gets stuck to the ground. Consider the length of the string as large, so that the pulley does not obstruct the motion of masses A and B