A 36-year-old man with a history of intravenous drug use presents with fever, weight loss, and night sweats. Chest X-ray reveals cavitary lesions in the upper lobes of the lungs. What is the most likely diagnosis?
a. Tuberculosis
b. Lung abscess
c. Pneumocystis pneumonia
d. Bacterial pneumonia
e. Fungal infection