The key to solving this type of problem is to realise that the acceleration of B is half the sum of the accelerations of A and C.
Note also that there is only one string which is passing over and under free moving pulleys so the tension in the string is the same at all points.
Fill in the required masses. Press Submit each time.
Press Release Mass.
Calculate the accelerations for the masses and the pulley B.
If you want to see the correct accelerations press Show Answers.
Press Reset to repeat the simulation with different masses.
Note: The positive direction of the accelerations of A and C is chozen as down, of B is up. If the actual directions are opposite, a negative answer is given..