please select the correct verb tense that used in the sentences below.

micheal had been working as a writer when a talent agent discovered him.
past progressive
past perfect progressive
present progressive
present perfect progressive

past perfect progressive (had been working)