Action force and re-action force would not cancel each other. Those two forces are acting on different objects.
There are two forces acting on your object A:
gravitation force (ms*g down) and the liquid try to push it up with buoyancy (ma*g up).
Because the liquid give your object A an upward force , so your object A also affects on the liquid ma*g down.
So the total force acting on the liquid is it's own gravitation force mb*g + ma*g (from object A).