Three block are in contact with each other on africtionless,horizontal surface,as in figure .A horizontal force F=18N is applied to m1(take m1=2kg,m2=3kg,m3=4kg). find a. acceleration?b. resultant force?c. magnitude of contact force?

I do not see the figure of course so will assume all three are in contact along the x axis.

Total mass = 2 + 3 + 4 = 9 kg
it is all accelerated in the x direction at once
F = m a
18 = 9 a
a = 2 m/s^2
force between 1 and 2:
m = 7 kg
F = 7 * 2 = 14 Newtons
force between 2 and 3
m = 4 kg
F = 4 * 2 = 8 Newtons