Two bodies of mass 4 kg and 6 kg are tied to the ends of a massless string. The string passes over a pulley which is frictionless (see figure). The acceleration of the system in terms of acceleration due to gravity is [2020]

(3)

Given :
From the diagram,
...(i)
...(ii)
Solving equation (i) and (ii)