There is no reason why Fha = Fab. If we write down the forces on the system:
Fha + Fab + Fba = (M_A + M_B)a
And as Fba = - Fab then Fha = (M_A + M_B)a
So, internal forces cancell each other and won't prodcue any acceleration.
If you think about it, you don't need two separate boxes. When you push any object, everý slice of it is in contact with the next one. If reaction forces cancelled external forces, nothing would ever move.