Of the 100 students, 37 take only Spanish. Subtracting 37 from 100 gives us 63 students who are taking either both Spanish and Chinese or only Chinese.
So, there are 63 students who are taking Chinese (just Chinese or both Chinese and Spanish).
Since the number of students taking Chinese is 8 more than the number of students taking Spanish, 63 - 8 + 55 students taking Spanish (just Spanish or both Spanish and Chinese).
Of these 55 students, 37 are only taking Spanish, therefore, 55 - 37 = 18 students who are taking both languages.
I guess a whole lot shorter way of looking at this is: for there to be 8 more students taking Chinese than Spanish, there must be 8 more students who are taking only Chinese than who are taking only Spanish: 37 + 8 = 45. Since 37 are taking only Spanish and 45 are taking only Chinese, 100 - (37 + 45) = 18 students who are taking both languages.