The subject of this sentence is “Avoiding” so option A) is correct. This is an example of verbs used as nouns and it is called “gerund”. The gerund is formed by verb+ing and it functions as a noun. The gerund “avoiding” in this sentence is the main word in the subject.
The words “academic” and “offences” are part of the subject but the main word, as mentioned before, is the gerund “avoiding”.
The noun “rules” is part of a prepositional phrase within the predicate.