А.1.When we came to my friends house, he had just left.
2.When mother came home,I had done me homework
3.I had done my homework before Nick called
B.1.He had had the car for twelve years when he sold it.
2.I went to bed as soon as I finished all the grammar exercise.
3.Tom returned from the cinema at five o,clock yesterday.
C. 1.I went to the cinema yesterday.
2.I was going to the cinema when I met you.
3.I had gone to the cinema before my mum came home.