past perfect.
first thing to note is that the sentence takes place in the past tense. The "had" in front of "finished" makes it the past perfect tense. a verb with any form of "be" in front of it is in the perfect tense. present perfect uses the present form of be, "am". I am bothering you--> present perfect. Future perfect would use "will", indicating future, and a form of "be". I will have won the game by the end of the hour--> uses "have" as a form of be.