We have,
\(f _1=20\,N , f _2=10\,N\)
\(m_1=2\,kg , m_2=4\,kg\)
Let tension between the blocks is \(T\)
Here, \(F_1 > F_2\)
So, the net force acts in the right direction.
for block of mass \(2 kg\),
\(T - F _2=2 a\)
\(T-10=2 a \ldots \ldots \ldots(1)\)
For the block of mass \(4\,kg\),
\(F_1-T=4 a\)
\(20-T=4 a .\)
BY solving the above two equation the we get,
\(10=6 a\)
\(\Rightarrow a=\frac{5}{3} m / s ^2\)
Thus,
From equation \((1)\) we get,
\(T=10+\frac{10}{3}\)
\(=\frac{40}{3} \,N\)