The correct option is B will have left
Here, 'will have left' in Future Perfect Tense is correct because it
is used to indicate an action that will be complete before another event takes
place. Here, 'by the time..' indicates an action that will be complete before another event takes place.
'Had left' in past perfect is incorrect because
it is used to indicate a completed action of the past that happened before
another event took place.
'Was leaving' in past continuous is incorrect because
it is used to indicate uncompleted action in the past (with or without time
reference).