For calculating force use the formula
a= F(net)/total mass
so a= 60/10+20+30
a= 60/60 = 1 m/s
now, if force is applied on 1 body then
tension between 2 and 3 body is
T1=mass x acceleration
= 30x1 = 30 N
and the tension between 1 and 2 body is
T = (30+20)x1 = 50N