Answer: 26
=====================================================
Work Shown:
A = 18 take bio
B = 13 take Spanish
C = 5 take both
A+B-C = 18+13 - 5 = 26 students total
------------------------------
Another approach:
18 take bio and 5 take both, so 18-5 = 13 take bio only
13 take Spanish and 5 take both, so 13-5 = 8 take Spanish only
We then have 13+8+5 = 26 students
Both methods only work when each student is in either bio, Spanish, or both. We cannot have a student who is in neither class.