1)By the time they had left, she arrived at their house.
2)When he finished using the computer, he had switched it off.
3)After they bought their tickets, they had gone into the cinema.
4) As soon as she had finished her homework, she went to bed.
5) When we had eaten our meal, we paid the bill.
6)They went into the house after they had unlocked the door.