Tell the main events with the past simple, and step back to an earlier event with had + the past participle.
The main events, and the earlier one
Matilda: By the time the bus came, I had finished my coffee.
Lani: Lucky you. Mine went cold.
Not "By the time I called, the shop closed.". Say "By the time I called, the shop had closed.". For the earlier event, step back with had + the past participle.
Try it: Yasmin: Did you catch your train on Friday? Choose Ethan's reply. (No. When I got to the platform, it had left ten minutes earlier. / No. When I got to the platform, it left ten minutes earlier.) Answer: No. When I got to the platform, it had left ten minutes earlier. The train went ten minutes before Ethan got there, so step back to that earlier event with had left.
For a longer action in progress behind the main event, use was / were + the -ing form.
Matilda: What were you doing when I called your name?
Lani: I was looking for my notes.
Try it: Hiroshi: Why didn't you answer my call last night? Choose Mei's reply. (Sorry, I was cooking when you called. / Sorry, I cooked when you called.) Answer: Sorry, I was cooking when you called. The cooking was already going on when the call came, so use was cooking.
Earlier, and going on a while
For an earlier action that went on for some time before a past moment, use had been + the -ing form.
Lani: We had been talking for an hour when the session ended.
Matilda: It felt like ten minutes.
Not "When help arrived, they were waiting for an hour.". Say "When help arrived, they had been waiting for an hour.". An earlier action that lasted up to a past moment takes had been + -ing.
Try it: Diego: Was Mateo annoyed when you finally got there? Choose Camila's reply. (Yes. He had been waiting for an hour. / Yes. He was waiting for an hour.) Answer: Yes. He had been waiting for an hour. An hour of waiting before Camila got there takes had been waiting.
What are the common mistakes?
Incorrect
Correct
Why
By the time I called, the shop closed.
By the time I called, the shop had closed.
For the earlier event, step back with had + the past participle.
When help arrived, they were waiting for an hour.
When help arrived, they had been waiting for an hour.
An earlier action that lasted up to a past moment takes had been + -ing.