For example, I have a force of $3N$ accelerating a $1$kg block $A$ on a frictionless surface to the right. $A$ accelerates at a rate of $3$ $m/s^2$. Say it collides with another block $B$, weighing $2$kg.
By adding the weights and treating it as one larger object weighing $3$kg, the acceleration would now equal $1$ $m/s^2$. However, when $A$ collides with $B$, isn't there an opposing force of equal magnitude applied on $A$, causing the net force on $A$ to be $0N$?
Can anyone please explain the mistake in my logic? I know the final acceleration is $1N$ but I'm not sure why my logic of the objects colliding doesn't give that answer.
Edit: Maybe a better question is, how is force applied from object $A$ to object $B$ calculated? I thought it was $F=ma$, but if object $A$ has $m=1$ and $a=3m/s^2$, doesn't that apply a force from $A$ to $B$ of $3N$?