A
When I (open) the window, the cat jumped in.
opened (simple past--past actions connected to each other)
They have done their homework. So they were allowed to play outside.
did (so - sequence of events)
had done (also possible)
When I was in high school, I had often wished to be taller.
had often wished → often wished (simple past--completed action, finished time period)