Two bodies of mass m1 and m2 attached to the ends of an extensible string passing over a frictionless pulling sch that both move vertically. The acceleration of the bodies is

A ) m1×m2/m1+m2 g

B ) m1-m2/m1+m2 g ✅

C ) m1+m2/m1-m2 g

D ) 2m1m2/m1+m2 g