When block B has mass m,
• the net force on block A is
∑ F = -T = ma
• the net force on block B is
∑ F = T - mg = ma
(note that we take the direction in which block A is pulled and in which block B is pulled downward to be negative)
By adding these two equations, we eliminate the tension T and find
-T + (T - mg) = ma + ma ⇒ -mg = 2ma ⇒ a = -g/2
Then the tension has an initial magnitude of
T = -ma = mg/2
Now replace block B with a block of mass 2m. Then
• the net force on block A is
∑ F = -T' = ma
• the net force on block B is
∑ F = T' - 2mg = 2ma
By eliminating T', we find
-T' + (T' - 2mg) = ma + 2ma ⇒ -2mg = 3ma ⇒ a = -2g/3
so that
T' = -m (-2g/3) = 2mg/3