What was [someone] doing?
¿Qué estaba haciendo ella cuando la viste?
What was she doing when you saw her?
¿Qué estaba haciendo Tom en la escuela?
What was Tom doing at school?
¿Qué estaba haciendo tu madre cuando llegaste a casa?
What was your mother doing when you got home?
¿Qué estaba haciendo ella allí?
What was she doing there?
¿Qué estaba haciendo Tom en tu cuarto?
What was Tom doing in your room?
What was he doing there?
¿Qué estaba haciendo ella aquí?
What was she doing here?