Given: The two masses are
The free body diagram for the system is shown below.
The equation of motion can be written as,
Where,
On adding equations (1) and (2), we get
By substituting the given values in the above equation, we get
Thus, the acceleration of the masses is
By substituting the value of
Thus, the tension in the string is