Hello and hope you are doing well.
X rays are images and can show radiolucent or opaque shadows. And only a differential diagnosis can be obtained from this. Further additional testing like CT scan, tumor markers or PET scan may further help in the evaluation. But a confirmed diagnosis of cancer can only be made with a histopathological study, which is the study of the cells, which is done on the biopsy of the lesion.
So, after therapy with antibiotics, a repeat X ray may be needed to see for resolution of the lung lesion, if it is due to pneumonia.
Hope this helped and do keep us posted.
A cavity in the lung is typically a region that should contain air cells, but has been replaced by some form of mass or lesion. In some, the 'cavity' can harbor organisms that can predispose a person to an infection process that can lead to pneumonia. It's something that will need follow-up to find out exactly what is going on.
You unfortunately posted on a GI board so you may not find a lot of people who have experienced this condition. You may want to consider re-posting your question on a MedHelp board that deals with lung/pulmonary issues.