Ответ:

  1. Kim finally showed up at the cinema after we had been waiting for an hour.
  2. They had been playing football all day, so they were tired.
  3. They had finished marking the papers when the guests arrived.
  4. The band had been performing for an hour when the electricity went off.
  5. Belinda had been studying German for three years before she moved to Munich.

Правило: Past Perfect показывает действие, завершившееся до другого действия в прошлом; Past Perfect Continuous подчёркивает длительность.