The correct option is C had been exercising
The past perfect continuous form of any verb is obtained by adding 'had been' to the base verb + ing. The verb in question is 'to exercise'; for which the base/ root form is simply 'exercise'. Applying the above, we clearly get 'had been exercising', which is Option C) - the correct answer. A) is simply past continuous tense; B) is past perfect and lastly, D) is also technically a form of past perfect continuous, but in a way that doesn't fit in with the rest of the sentence.