South High School offers only Chinese and Spanish. There are $5$ more students in Chinese than in Spanish, and every student takes at least one language. If there are a total of $12$ students in South High School, and $15$ students take only Spanish, then how many take both languages?
Variable time :)
x = Chinese students
y = Spanish students
x = y + 5
Now its time for a ven diagram (sort of):
Chinese students: x
Spanish students: y (x - 5)
both: z
Using the principle of inclusion-exclusion: we can express this into:
(x - z) + (x - 5 - z) + z = 12
x - z + x - 5 = 12
2x - z - 5 = 12
2x - z = 17
Only 15 take spanish, so:
y = 15, x = 15 +5 = 20
Plugging x = 20 into 2x - z = 17, we can get that there are 23 students taking both.