As a NES but not a teacher, I would use the second option:
"Could you do me a favor. Please tell Mary that I said Hello."
"Favor" is the US spelling vs "favour" in UK.
They will tell Mary after you told them to say Hello to her. Hence I would personally use the past tense.
Teachers can give a definitive response.
Hope this helps
- For Teachers