If you would like to know what fraction of the students named baseball as their favourite sport, you can calculate this using the following steps:
1/3 of the students ... basketball
1/8 of the students ... soccer
5/12 of the students ... football
x of the students = ? ... baseball
x = 1 - 1/3 - 1/8 - 5/12
x = 24/24 - 8/24 - 3/24 - 10/24
x = (24 - 8 - 3 - 10) / 24
x = 3/24 = 1/8 of the students
The correct result would be 1/8 of the students.