Final answer:
Air flows out of the lungs when the rib cage becomes smaller during the exhalation phase of respiration, due to increased air pressure inside the lungs.
Step-by-step explanation:
When the rib cage becomes smaller during respiration, air will flow out of the lungs. This process is a part of exhalation, during which the diaphragm relaxes and moves upward, reducing the volume of the thorax and causing the air pressure inside the lungs to be higher than the air pressure outside. This results in air being forced out of the lungs, as it moves from a region of higher pressure to one of lower pressure, similar to the air rushing out of a balloon when it is released.