It's hard to say without more context and without hearing the conversation, but here's one interpretation:
If B stresses the word 'You're' very strongly, stretching it out in a pretence of amazement, and ends on an upward note like a question, it could mean something like: 'What do mean YOU'RE glad? I'm the one who's REALLY glad. You've just (for example) saved my life by offering to help me with my end-of-year dissertation. I'm the one who should be glad, not you!'
So yes, it is kind of informal 'thank you'.