I don't think the two sentences have the same meaning, nor do they have the same intention of a speaker.
How long have you learned Maths?
The speaker wants to know the duration from (between) the time when you started to learn Maths and to (and) now. The answer would be "for X years or months" or else.
When did you start to learn Maths? (How long ago doesn't sound idiomatic and it is rarely used in English.)
The speaker wants to know the time when you started to learn Maths. (S)he is not interested in finding out the duration and it doesn't matter whether you stopped learning it in the past. The answer would be "X years or months ago", "in 2000", or "when I was 12", etc.
Ngram viewer: "When did you" vs "How long ago did you" in American English.