Ответ:

The activity lasted for five years before another past event, so the past perfect continuous is the most appropriate tense.

Answer: c) had been working