hello asma,coughing out blood/presence of blood in sputum is called haemoptysis.you have mentioned that you have recovered from a chest infection
.haemoptysis can occur in respiratory tract
infections.this blood is most probably coming from the lungs.you have to consult a physician or a pulmonologist,who will most probably order a few tests like a chest x ray
,a haemogram[a simple test to detect an acute infection],sputum testing to detect bacterial infection, he may also ask for a bronchoscopy
.you will be given an antibiotic to clear this infection.stay calm,do not neglect this symptom,consult a doctor asap.dont worry you will be fine.