Diagram shows the various forces acting on the masses and their resolution in the direction of motion. Let us consider the two masses to be a system. The forces trying to move the system such that A moves upwards and B moves downwards=2​2mg​−2​mg​=2​mg​The forces trying to stop this motion (i.e., maximum frictional force)=fA​+fB​=μA​NA​+μB​NB​