3
1) before her guests arrived, she had already prepared the diner.
2) by the time Jane came home, her parents had already gone.
3) she was sad because she hadn't passed her exam.
4) he felt really happy because he had got a present from his sister.
5) he went to the cinema after he had done his homework.