I don't think that hey is impolite but it is certainly casual. It is just an interjection intended to get attention. When you say "hey", you mean "I have something to say." In more formal contexts you should prefer "excuse me."
"It's my pleasure" or simply "my pleasure" is courteous and never too formal or informal in my opinion. You could also say "I'd be delighted" or more casually "no trouble at all" or very informally "no problem".
Student or Learner