Теория:

Study some information about questions (general and special) in Past Perfect Continuous.
 
Для образования Past Perfect Continuous необходимо использовать структуру had been и основной глагол с окончанием -ing.
Subject \(+\) had \(+\) been \(+\) Ving \(+\) other parts of the sentence.
Для построения вопросительных предложений нужно использовать следующий порядок слов.
 
General question
Had \(+\) subject \(+\) been \(+\) Ving \(+\) other parts of the sentence?
Had she been cooking a lemon pie for an hour before I came?
 
lemon pie.jpg
 
Special question
Question word (when, why, how, what...) \(+\) had \(+\) subject \(+\) been \(+\) Ving \(+\) other parts of the sentence?
Why had he been talking on the phone for half an hour when I entered the room?
 
talk on the phone.jpg
Источники:
dating.lovetoknow.com/How_to_Talk_to_a_Girl_on_the_Phone
http://www.tabsandtidbits.com/magnolia-lemon-pie/