A mass, m1 = 5.00 kg, resting on a frictionless horizontal table is connected to a cable that passes over a pulley and then is fastened to a hanging mass, m2 = 9.0 kg. Find the acceleration of each mass and the tension in the cable.

PLEASE HELP!