Videos
According to both the Oxford Learner's Dictionary and the Cambridge Dictionary, when you talk about spending time, if you use a present participle (-ing), you don't normally use the on preposition. Here are two examples from the Oxford Learner's Dictionary: the first uses a present participle, and the second one does not.
spend something on something: How long did you spend on your homework?
spend something doing something: I spend too much time watching television.
The correct version of your sentence is therefore:
My daughter spends two hours studying mathematics every day.
Or alternatively, you could say
My daughter spends two hours on mathematics every day.
In the structure X spend(s) Y Z, where Y is a duration; Z can be an action or a thing. If it's a thing, a preposition is needed.
I spent 2 hours washing my clothes.
I spent 2 hours at the laundromat.
Actions can be considered things if expressed as a gerund or gerund phrase. A context where you'd want to "thing-ify" an action is if you're concerned with a sequence of tasks and how long they took/fit into a timeline or higher-level duration.
I spent 2 hours on washing my clothes. Then I spent 1 hour on washing my mom's clothes. Then I spent 2 hours on drying them.
My daughter spends two hours on studying mathematics every day.
You're saying that your daughter dedicates to hours to studying mathematics. She has a two-hour timeslot where she does nothing but study math.
It takes my daughter two hours to study mathematics every day.
This means your daughter is trying to complete the task "study mathematics" and it ends up taking two hours, but it is not planned to take two hours.