Hello!
Answer:
avais été
Step-by-step explanation:
J'avais été très surpris de le rencontrer à cet endroit.
The verb "être" is conjugated in the past perfect of the indicative, because it expresses a past action completed before another past action.
In this case, the action of "être surpris" is completed before the action of "le rencontrer".