Tension in Cord

1. The problem statement, all variables and given/known data
Two masses M1 = .600kg and M2 = 2.2kg connected by a cord of negligible mass and passes over a frictionless pulley of negligible mass. Assuming that y axis has a positive upward direction, what is the tension in the cord?

2. Relevant equations
F = ma

W = mg

3. The attempt at a solution
I first tried to add up the Fg for both masses under the assumption that the opposing force would be the tension.

I then subtracted the larger Fg from the smaller Fg which was also wrong.

I found the equations of the two blocks to be T - m1g = m1a and m2g - T = m2a.
this makes T = m1a + m1g = m2g - m2a.
Plugging in the numbers gives 5.88N + .6a = 21.56N - 2.2a
solving for a gives a = 5.6ms-2
Plugging this back into the T equation gives a T of 9.24N
I then double the T because there is T working on both ends of the rope and get 18.48N.
I turns out that this is an incorrect answer and I am now out of ideas. Please help.