This three-part skit is from ArTHOR / The Big Fang Theory.
Transcript Act 1
Teacher: X + Y =... (spitball hits teacher on the back of the head) Ow! Okay, who did that?
(Ninja points to boy next to him)
Boy: Huh? Wha?
Transcript Act 2
Teacher: The war of 181-... (Batarang hits teacher in the head) OW! Who threw this?
(Batman hums and looks at the to boy next to him)
Boy: What? What the-... I don't even own a Batarang!
Transcript Act 3
Teacher: A verb is an action wor-... (a ray gun shoots the teacher) AAAAAAAAAAAAH!!!!!! (disintegrates)
(Alien puts ray gun away)
Boy: I guess I'll walk myself to the principal's office.
- Part of the second act appeared in the 2011 Comic-Con "CN Comedies" preview, when Mordecai and Rigby got to MAD.