In أَمَامَ الْمُعَلِّمِ, الْمُعَلِّمِ is the majrur mudaf ilayh.
Maf'ul Fih: Adverbs of Place