According to the question
Mg – T1 = Ma …(1)
(T2 – T1)R = Ia/R (T2 – T1) = Ia/R2 …(2)
(T2 – T3)R = Ia/R2 …(3)
T3 – mg = ma …(4)
By adding equation (2) and (3) we will get,
(T1 – T3) = 2 Ia/R2 …(5)
By adding equation (1) and (4) we will get
– mg + Mg + (T3 – T1) = Ma + ma …(6)
Substituting the value for T3 – T1 we will get
Mg – mg = Ma + ma + 2Ia/R2
a = (M -m)G /(M +m)+2l/R2)