The force acting on each block is gravitational force given as,
The torque acting due to first block is,
This can be solved as,
The torque acting due to second block is,
This can also be solved as,
Therefore, the net torque acting on system is,
Substituting values,
Thus, the net torque acting on system is