A gerund is a form of a verb used as a noun, whereas a participle is a form of verb used as an adjective or as a verb in conjunction with an auxiliary verb.
Gerund eg: Traveling is fun.
Participle eg: The traveling man stopped.
From the given options:
Option B is correct as the word 'exercise' is acting as a noun here and 'doing' is a verb used as an adjective which describes and clarifies the noun.
Also, since 'doing' is in the present continuous tense, it is a present participle.
The incorrect options are:
Gerund - here 'doing' isn't used as a noun.
Past Participle - as 'doing' is in the present tense and not past.