Chris.
Of the 25 students, 4 would not go to a haunted house or go trick or treating. That leaves 21 students who would participate in either activity or do both.
17 students will go trick or treating or trick or treating and haunted house
20 students will go to a haunted house or haunted house and trick or treating
But 17 + 20 = 37
37-21 = 16
This gives us the following
25 Total students
4 not participating
16 = trick or treating AND haunted house
17-16 = 1 trick or treating only
20-16 = 4 haunted house only
4 + 16 + 1 + 4 = 25 students