Kindly refer to the following links:

How to thank people | Sheikh Assim Al Hakeem

Should we say Jazak Allah or Jazak Allah Khair? | Sheikh Assim Al Hakeem

If someone says Jazakum Allahu khairan to you:
You can reply: Wa antum fa jazakum Allahu khairan

Or: wa yaakum

fem: Jazaki Allahu khairan -wa yaaky
masc: Jazak Allahu khairan -wa yaak