In Arabic grammar, nouns are pluralised in different ways. A جمع المذكر السالم (sound masculine plural) is formed by adding ون (in the nominative case) or ين (in the accusative/genitive case) to the singular noun, while keeping the original structure of the word intact. This is the "sound" plural because the base form of the word is preserved.
The singular word here is معلم (teacher). Applying the sound masculine plural rule, we add ون to get معلمون in the nominative case. This is the correct جمع مذكر سالم. The option أعلام is a جمع تكسير (broken plural) of the word علم (flag/sign), not of معلم, so it does not apply here. The option مُعلِّمین uses the Persian/Urdu-style ین ending rather than the standard Arabic ين, making it non-standard in formal Arabic grammar.
Exam tip: To identify a sound masculine plural, check that the singular form is preserved and only ون or ين is appended. If the internal structure of the word changes, it is a broken plural (جمع تكسير), not a sound plural.