The answer to your question would be that the tense of the underlined verb is past perfect progressive. That is, the correct option would be D.
The past perfect progressive, also known as past perfect continous, is a verb tense which is used to show that an action started in the past and continued up to another point in the past. The past perfect progressive is formed by using had + been+ present participle.