Thanks for your query.
You are having lower respiratory tract
infection more likely acute bronchitis
.The green and yellow mucus is due to infection and you need to take antibiotic to get treated and prevent further complication.I would suggest you to consult a doctor and get an antibiotic prescribed.
With proper treatment you shall be fine.