B. The infinitive to apologize functions as the subject of the sentence.
Explanation:
An infinitive in English grammar is the basic form of a verb that usually has the word "to" before the verb and can be used to modify a noun or pronoun in a sentence and it can also act as a subject or object of a sentence.
Therefore, from the given sentence, the infinitive "to apologise" is used in the sentence as the subject of the sentence.