In the above problem, if we consider the two masses to be a system, the tension is an external force.