Two blocks of masses 40 kg and 30 kg are connected by a weightless string passing over a frictionless pulley as shown in the figure. The acceleration of the system would be

(1)

Here,
Let be the tension in the string and be the acceleration of the system.
Their equations of motion are
Adding (i) and (ii), we get
Substituting the given values, we get