There is no reason why Fha = Fab$F_{ha} = F_{ab}$. If we write down the forces on the system:
Fha + Fab + Fba = (M_A + M_B)a$$ F_{ha} + F_{ab} + F_{ba} = (M_A + M_B)a $$
And as Fba = - Fab$F_{ba} = - F_{ab}$ then Fha = (M_A + M_B)a$F_{ha} = (M_A + M_B)a$
So, internal forces cancell each other and won't prodcueproduce 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.