2. I had just arrived when the telephone rang.
3. She had been living in Berlin for three years when the war broke out.
4. I had been waiting for him for three hours when he came.
5. After Mary had finished sewing, she went shopping.
6. Jim arrived at the railway station, took a taxi and drove to the hotel. He had booked the room in the hotel beforehand.