Step 1: Cavitation means a gas-filled space within a zone of consolidation, mass or nodule, produced by expulsion of necrotic lung tissue through the bronchial tree.
Step 2: The classic cavitating infection of the lung is post-primary (reactivation) pulmonary tuberculosis, where caseous necrosis liquefies and drains through a draining bronchus, leaving an upper-lobe thick-walled cavity.
Step 3: Mycoplasma pneumonia causes an atypical (walking) pneumonia with interstitial and patchy infiltrates and essentially never cavitates.
Step 4: Streptococcus pneumoniae (the pneumococcus, the agent of typical streptococcal lobar pneumonia) characteristically produces lobar consolidation without cavitation; cavitation here would be exceptional.
Step 5: Although Staphylococcus aureus pneumonia can cavitate and form pneumatoceles or abscesses, among the four choices the single best, most classic cause of pulmonary cavitation is tuberculous pneumonia.
Step 6: Note on the key: the printed recall key marked option C (Streptococcal pneumonia), which is medically incorrect because pneumococcal lobar pneumonia does not cavitate. Applying the medically correct answer, the best response is Tuberculous pneumonia.
Conclusion: The correct answer is Tuberculous pneumonia.