Draw the FBD of all the blocks and the pulley B. The acceleration of pulley B is same in magnitude as the acceleration of m1. In the frame of pulley B blocks m2 and m3 will experience pseudo forces.
Suppose the acceleration of m1 is a0 toward the right. That will also be the downward acceleration of the pulley B because the string connecting m1 and B is constant in length. This implies that the decrease in the separation between m2 and B equals the increase in the separation between m3 and B. Therefore, the upward acceleration of m2 with respect to B equals the downward acceleration of m3 with respect to B. Let this acceleration be a.
The acceleration of with respect to the ground = a0 − a (downward) and the acceleration of with respect to the ground = a0 + a (downward).
These accelerations will be used in Newton’s laws. Let the tension be T in the upper string and T′ in the lower string. Consider the motion of the pulley B. The forces on this light pulley ar
(a) T upward by the upper string and
(b) 2T′ downward by the lower string.
As the mass of the pulley is negligible,
2T′ – T = 0 Giving T′= T/2 . ... (i)

Motion of m1: The acceleration is a0, in the horizontal direction. The forces on m1 are
(a) T by the string (horizontal).
(b) m1 g by the earth (vertically downward) and
(c) N by the table (vertically upward). In the horizontal direction, the equation is
T = m1a0 ... (ii)
Motion of m2: Acceleration is (a0 − a) in the downward direction.
The forces on m2 are
(a) m2g downward by the earth and
(b) T′ = T/2 upward by the string.
Thus m2g - T/2 = m2(a0 − a) .....(iii)
Motion of m3 : Acceleration is (a0 + a) in the downward direction.
The forces on are
(a) m3g downward by the earth and
(b) T′ = T/2 upward by the string.
Thus m3g - T/2 = m3(a0 + a) ... (iv)
We want to calculate a0, so we shall eliminate T and a from (ii), (iii), and (iv).
Putting T from (ii) in (iii) and (iv),
