If Mary's answer is "I have been working on my homework," then Mary's mom's question would have been: "What have you been doing since you got home?" or "What have you been doing all afternoon?"
If Mary's mom asked "What are you doing now? Have you done your homework?" then "I was working on my homework" would be an appropriate response.