Thanks for writing to us.
Cough with white phlegm and scanty blood could be because of upper respiratory tract
infection like pharyngitis
,bronchitis or lower respiratory tract infection like pneumonia.Also you have pain ribs that is more while coughing could be due to chronic coughing leading to muscle ache.
In such cases it takes time to resolve cough and chest pain
.If you do not have fever,malaise,breathlessness then you need not repeat antibiotics course. you can take mucolytic and cough expectorant syrup for symptom relief if hemoptysis
Hemoptysis is not a good sign for chest infection
.Hence i would like to suggest to get a X-ray chest done along with sputum AFB, cytology and visit to physician for clinical correlation and further investigations if needed.
Hope this will help you.
Wish you good health.