Listen to the dialogue
The Past Perfect expresses the idea that something occurred before another action in the past.
It can also show that something happened before a specific time in the past.
The Past Perfect Continuous is used to show that something started in the past and continued up until another time in the past. "For five minutes" and "for two weeks" are both durations which can be used with the Past Perfect Continuous. Notice that this is related to the Present Perfect Continuous; however, the duration does not continue until now, it stops before something else in the past.