Ответ:

1. He was unhappy because he had failed his tests.
2. Our teacher was angry because we had not done our homework.
3. She had a terrible headache because she had been working on the computer all day.
4. The children came back home very tired because they had been playing outside for hours.
5. She was late because she had missed the bus.
6. They were wet because they had been walking in the rain.