Horizontal force, F = 600 N
Mass of body A, m1 = 10 kg
Mass of body B, m2 = 20 kg
Total mass of the system, m = m1 + m2 = 30 kg
Using Newton’s second law of motion, the acceleration (a) produced in the system can be calculated as:

When force F is applied on body A:

The equation of motion can be written as:
F – T = m1a
T = F – m1a
= 600 – 10 × 20 = 400 N …………. (i)
When force F is appliedon body B:

The equation of motion can be written as:
F – T = m2a
T = F – m2a
T = 600 – 20 × 20 = 200 N ………….. (ii)