The past perfect tense is formed using 'had' + the past participle of the verb. The past participle of 'be' is 'been'. The question is in the past perfect tense.
15. How long had he been in the room?