Hi,So You should go further with few other relevant investigations like Blood for CBC,
CRP,Sputum for TB(since the cough is long term in nature),Tuberculin test,Chest X Ray PA view(SOS CT chest).
This will rule out the cause for your chronic
cough.
As far as your Typhoid..
Typhoid is recurrent in nature,be very careful in terms of what your diet,Avoid taking outside food and water,do maintain proper hygiene,prefer to boil your water while drinking.
Try to stay at home for some time until your better clinically.