Since an infinitive phrase is a phrase that focuses on the object of the verb and an infinitive verb is an -ing verb, your phrase is "taking advanced math".
Answer:
metaphor
Explanation:
This phrase is not literally applicable, he won't actually restrain himself so that he won't eat any chips.
It would have been more drimatic
Answer:
a conjunction
Explanation:
it can link 2 thing together that are similar or add extra info
I'm not an expert on english but this is what I think it is... you may want to get a second opinion.