A device known as Atwood’s machine consists of two masses hanging from the ends of a vertical rope that passes over a pulley. Assume the rope and pulley are massless and there is no friction in the pulley. Mass mB is greater than mass mA. Find expressions for the magnitude of their acceleration, a, and the tension in the rope, T. Express your answers in terms of the masses and g, the acceleration due to gravity.