Answer:
Initially, the ballast tanks are filled with water. The weight of the submarine is equal to the upthrust of the water at the position of the submarine under water. When high pressure air is released into the ballast tanks displacing the water, the weight of the submarine becomes less than the upthrust of the water thus the net force is is upwards and it forces the sub to resurface. This is according to the Archimedes principle which states that a a body partially or wholly immersed in water displaces its own weight of the fluid in which it is immersed.