The right answer is (d) Past Perfect Continuous
Past Perfect Continuous represents an action that began before a certain point in the past and continued up to that time.
Other uses:
- Showing cause of an action or situation
- Third conditional sentences
- Reported speech
The past perfect continuous is composed of two elements – the past perfect of the verb to be (=had been) + the present participle (base+ing).
To learn more about tenses, click here.