In the arrangement shown, the pulleys and the strings are ideal. The acceleration of block B is
g5
g2
2g5
2g3
For B : mg-T = ma
For A : 2T - mg = ma2
⇒mg = 52ma
a = 2g5