It is not subs have two tanks, we have two tanks, so we are stable. Subs shift water between their tanks. You do not normally pump air between doubles to adjust their mass.
And stability is a bit more about having ballast low. Plus subs have more than two ballast tanks. Plus trim tanks, fore, aft, port, starboard. And compensating tanks near the center.
ETA: I have now reordered the sentences of my above paragraphs for clarity. Without changing their content. Putting the crucial difference first, then extra other issues later.
View attachment 537670
Submarine Design: Unique Tanks On a Submarine
Now, if you want to talk about subs move mass and are stable. We can move mass/lead. Could that make us stable?? That would be an analogy that would work.
Quoting from that piece:
"Trim tanks are used to maintain the longitudinal center of gravity just under the center of buoyancy, so that the submarine can be maneuvered to a neutral trim condition."