With 'mentre', both actions are usually ongoing → both in imperfetto. If one action interrupts the other, the ongoing one uses imperfetto and the interrupting one uses passato remoto.
Passato Remoto vs Imperfetto — 'Mentre' and Simultaneous Actions1 / 10