Student or Learner
1) Were you thanking me/him?
2) Was that thank you/thanks directed to me?
What's the context? They sound spoken, so the first requires or and I would treat thanks as a plural, though others may do differently.
I think a lot depends on the context-- who are you asking and is this a sensitive question? You could use the passive, which might make the question a bit less direct and give the person asked some room for manoeuvre.