Ответ:

I had already done my homework when my mother came home.