The method is as follows:
Total number of students = number of people who like football+number of people who like volleyball+number of people who like table tennis-number of people who like both football and table tennis-number of people who like both football and volleyball+number of people who like all three kinds of balls.
54=20+30+ the number of people who like table tennis-18-14-12+the number of people who like all three kinds of balls.
So the number of people who like all three kinds of balls = 54-20-30+18+14+12-the number of people who like table tennis =48- the number of people who like table tennis.