1. Find the total taking only history:
* Students taking history: 22
* Students taking both: 8
* Students taking only history: 22 - 8 = 14
2. Find the total taking only biology:
* Students taking biology: 17
* Students taking both: 8
* Students taking only biology: 17 - 8 = 9
3. Find the total taking history or biology:
* Students taking only history: 14
* Students taking only biology: 9
* Students taking both: 8
* Total taking history or biology: 14 + 9 + 8 = 31
4. Find the total taking neither:
* Total students: 42
* Students taking history or biology: 31
* Students taking neither: 42 - 31 = 11
Answer: 11 students take neither history nor biology.