Answer:
"the time"
Explanation:
The first sentence reads: "I had finished my homework when my sister arrived". This means that at the moment the narrator's sister arrived, he/she finished his/her homework. There a few ways to say "at the moment". One of these is "when", which is already used in the first sentence.
However, another phrase that can be used is "by the time". "By the time" means literally "at that time". It fits perfectly here, and we can see that the second sentence already gave us the "by" before the blank.
Hope this helps!