we know that tension of string always tries to pull te bodies up.
From the FBD of the mass `m _(1),` there exist two forces on the load of mass `m _(1),` one is tension of the string acting in upward direction and weight of the load `(m_(1) g)` acting in downward direction.
The net force on `m _(1) F _(n et) = m_(1) a`
`implies m _(1) g -T =m_(1) a ---------------(1)`
Thus the net force `(F_(n et))` acting on mass `m _(1)` produces an acceleration .a. in it.
When `m _(1)` moves down, `m _(2)` moves up. So the magnitudes of acceleration are same.
From the FBD of mass `m _(2)`
`F _(n et) =T - m _(2) g =m_(2)a ----------------(2)`
Solving (1) and (2) equations, we get
`a = ((m _(1) - m _(2) g)/( m _(1) + m _(2))`
` T = ( 2m _(1) m _(2) g)/( m _(1) +m_(2))`