A force diagram of the given situation is shown below:
where,
T: tension of the cable
fg1: weight of block 1 = (7 kg)(9.8m/s^2) = 68.6 N
fg2: weight of block 2 = (12 kg)(9.8 m/s^2) = 117.6 N
Based on the previous information and the force diagram, you can conclude:
Two forces are acting on 7kg mass
Two forces are acting on 12kg mass
The forces in the system are unbalanced because there is a net force.
The mass of the system is the sum of the given mass:
mass of the system = 7kg + 12kg = 19 kg
In order to determine the net force of the system is given by the difference between the weights of the blocks. Then, you have:
Fnet = fg2 - fg2 = 117.6N - 68.6N = 49N
The acceleration of the system us given by:
a = Fnet/m = 49N/(19kg) = 2.58 m/s^2
After release 7kg mass moves upward, because the weight of the 12kg mass is greater.
To calculate the tension in the cable, use the sum of forces on any of the two blocks, for instance, in the frist block:
T - fg1 = m1*a
T = m1*a + fg1
T = (7 kg)(2.58m/s^2) + 68.6N
T = 18.05N + 68.6N = 86.85N