see, in this prob, under the effect of the 2 oppositely directed tensions, the whole rod will move with the same acceleration in 1 direction.
now, resultant force is 12N towards right.
so, the whole rod moves with acceleration = F/m = 12/3 = 4 m/s2
now, assuming uniform mass distribution, mass of the 20cm part = 2kg & that of the 10cm part = 1kg.
Now assume that the 20cm part of the rod is 1 rod and the 10cm part is a 2nd rod. They are separated by some distance (suppose), and both these are connected with a massless string... and the force exerted by the 20cm rod on the 10cm rod is equal to the tension in this massless string connecting them. Hope u got it!
Let the tension in this string be T
so, for the 20cm part of the rod, acceleration = 4 units (F/mass)
=> (12 - T)/2 = 4
=> T = 4 N
{note that the T can be found using the 10cm part of the rod also...
T/1 (ie mass of that part) = 4 (the acceleration)}
now, 4N is the resultant force... so the actual F exerted on 10cm rod by the 20cm rod is 20N + 4N = 24 N (Answer)
Hope u understood....RATE if useful !!