Let T N be the tension on the string and a m/s^2 be the acceleration of the system.
Now considering the forces on the 1kg block lying on the frictionless table we can write
T = 1×a .........(1)
Again considering the forces on hanging 1kg block we can write
1×10 - T=1×a.......(2),taking g=10m/s^2
Adding (1) and ( 2) we get
2a=10 => a=5m/s^2
So T = 1×5=5N