The correct option is A aB=2aA
To solve these kind of constraint relation problem, I will tell you a trick.
Consider block and tension as a system.
Now tension in the string is internal force, then
∑Tiai=0
Work done by all internal forces =0
Differentiating
∑Tiai=0
Let acc. of 2M mass= aB
and acc. of M mass= aA
∑Tiai=0
TaB−TaA=0
aB=2aA
∴OptionB