Dear student,
As the temperature of a liquid increases, the solubilities of gases in that liquid decrease. We can use the Second Law of Thermodynamics to explain why. Heating a solution of a gas enables the particles of gas to move more freely between the solution and the gas phase. The Second Law predicts that they will shift to the more disordered, more highly dispersed, and therefore, more probably gas state.
In a similar way, we can explain why the substances that are solids at room temperature and pressure tend to become more soluble when the temperature rises. Heating a solution of a solid makes it easier for the particles of solid to move between the solution and the solid phase. The Second Law predicts that they will shift to the more disordered, more highly dispersed, and therefore, more probably solution state.