The infinitve phrase that is the subject of the sentence is "To finish his exam without breaking another pencil."
An infinitive phrase will begin with an infinitive [to + simple form of the verb]. It will include objects and/or modifiers. Infinitive phrases can function as nouns, adjectives, or adverbs.
When an infinitive phrase introduces a main clause, the two sentence components will be separated with a comma.