A constant force F = m2g/2 is applied on the block of mass m1 as shown in figure. The string and the pulley are light and the surface of the table is smooth. The acceleration of m1 is
m2g2(m1+m2) towards right
So if m1 has an acceleration of a towards left m2 will have to have an acceleration of a upwards - constraint relation.
lets draw Free Body Diagram of m1 & m2
Net force in direction of acceleration T - m2g=m2a -----------------(II)
F - T = m2a
We know F=m2g2
⇒m2g2−T=m2a ----------------(I)
Adding equation (I) & (II) we get
m2g2−m2g=(m2+m2)a
a=−m2g2(m1+m2)
so accleration a of m2=a=−m2g2(m1+m2)
The negative sign infers that acceleration is opposite in direction to that of assumed positive i.e., rightwards.So acceleration of m1=−m2g2(m1+m2) rightwards.