They were making noise when the teacher ________ the class.
They were making noise when the teacher ________ the class.
Explanation
Something was happening: verb + ing (making noise)
Something happened: second form of a verb (entered)
Something was happening: verb + ing (making noise)
Something happened: second form of a verb (entered)