1. They finished their homework after they had played football.
2. Jim passed the English exam before he had studied hard.
3. The guests arrived when she had finished cooking dinner.
4. The bell rang by the time the students had already left the classroom.