أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
In example1 you had been studying, past tense, indicating that you had finished by the time she arrived. In the second example you were still in the process of studying when she arrived, Again it is past tense, the rationale being that both examples apply to something which has already happened!
ie.1 - Finished studying, at that time.
2 - Studying still in progress, at that time.