Step-by-step explanation:
By using a figurative language called Metaphor, Ned was likely comparing the words, "Yes, teacher" to the remarkable effectiveness of using those words to have a good relationship with his teachers while in Mission school.
Hence, Ned was likening how effective or convincing magic actually is with the words "Yes, teacher".