If no force is applied, the block A will slip on C towards right and the block B will move downward. Suppose the minimum force needed to prevent slipping is F, taking A+B+C as the system, the only external horizontal force on the system is F. Hence the acceleration of the system is
a = F/2m+M
take the block A as the system. The force on A are
1) Tension T by the string towards right
2) Friction f by the block C towards left
3) Weight mg downward and
4) Normal force N upward.
For vertical equilibrium N = mg.
As the minimum force needed to prevent slipping is applied, the friction is limiting thus
f = mN = mmg
As the block moves towards right with an acceleration a,
T –f = ma
Or T - mmg = ma ----------------- (2)
Now take the block B as the system the forces are as shown in fig (b).
1) Tension T upward.
2) Weight mg downward
3) Normal force N1 towards right
4) Friction f1 upward.
As the block moves towards right with an acceleration a, N1 = ma.
As the friction is limiting, f1= mN1 = mma
For vertical equilibrium
T + f1 = mg
T + mma = mg
Eliminating T from (1) and (3)
amin = (1-

)*g/(1+

)
When a large force is applied the block A slips on C-towards left and the block B slips on C in the upward direction. The friction on A is towards right and that on B is downwards solving as above, the acceleration in this case is
Thus the force should be between
(1-

)(M+2m)*g/(1+

) and
(1+

)(M+2m)*g/(1-

)