7 weeks ago, i cough up dark pink sputum, I'm not really feel like fever, or fatigue, I just cough like flue symptom, and then I took an x-ray, it showed I got pneumonia, then my doctor give me antibiotic (erythromycin 500mg) once a day for 5 days, I totally feeling much better.

Then last weeks I took another x-ray, but it showed I still have pneumonia, I have no fever.
my question is, how many days should I took antibiotic for treat pneumonia, is it enough just for 5 days?
I'm so worry about it, is it tend to lung cancer? Please help, Thank you in advance! :-(