✔ 最佳答案
ago only defines as "past tense", but it is the relations between the teaching and studing determines the relative tenses to be used in the sub-clauses.
I think No.1 is correct grammatically and contextual because the siutation can be thought of as:
During the period when Mary was studying in ABC School, which was nine years ago, Peter taught her Chinese.
So Mary's studying in ABC School should be longer (or extending longer) than the Chinese lesson (which should be less or equal in time period) being taught.
In contrast, No2. holds true if Mary only studied Chinese in ABC School. As the Chinese teaching period equals the studing period exclusively.
Thus, generally speaking, No.1 is usually consider correct as it is a statement describing the context in which the events occurred in the past.