We have the next diagram
Then we analyse the equation
[tex]F=ma[/tex]In our case
F=15N
m=2+1=3
a=?
[tex]15=(3)a[/tex]Then we isolate the a
[tex]a=\frac{15}{3}=5\text{ m/s}^2[/tex]Then for the force between the blocks we already know the acceleration
[tex]a=5\text{ m/s}^2[/tex][tex]F=1\cdot5=5N[/tex]