Pharynx is a common passageway for food and air. It opens into the oesophagus (which leads to the stomach) and trachea (which leads to the lungs). Pharynx plays an important role. It receives air from nasal cavity and food, water, etc. from oral cavity.
Regards.