IgM is an acute response to the infection while IgG
antibody is an chronic response of infection. So when you are first tested for Typhoid
and both the antibodies
are positive suggestive of you had an acute infection which is becoming chronic that means your are having an infection which has not been treated and now its for a longer duration.
After you get treated for typhoid and tested showing IgM positive indicated a fresh infection with typhoid. Its not the same one as if its reccur it will show IgG antibodies instead of IgG as typhoid Ag is there in their memory. So now again you have to go for Typhoid treatment means follow the whole course again and take care of food as you have eaten contaminated food for the second time.