My mind gets quite confused by combining the past with the present (subjunctive) in one sentence. This is more a question about the subjunctive mode than about rentrer, but could you explain in which situations you use le passe of the subjunctive? If this sentence used parce que, rather than avant que, what tense would you use? (something like "Mathilde a rentre la voiture parce qu'il allait pleuvoir"? - sorry, no accents; if this structure exists, I wouldn't know what the tense is called!)
Thanks in advance for your clarification!