Thanks for writing your query.
After reading your post, it seems that you are having bronchitis and lower respiratory tract
First of all you should get the following investigations done :-
1. Chest X-ray PA view
2. Complete Blood Count
3. Sputum examination (Culture and Senstivity and AFB testing)
Yellow and thick mucus can be due to some infection in the respiratory tract. Red colour in the sputum can be due to some leakage of blood from thin blood vessels as a result of severe coughing
You can take bronchodilators like Levosalbutamol
along with mucolytics like Bromhexine.
Antibiotics, if needed can be started according to the culture/senstivity report. Steam inhalation and chest physiotherapy
will also help to cough out mucus easily.
You should get yourself examined medically and investigated before starting any medication.
I hope this is helpful to you.