Haven't done a problem like this in a while but from what I remember:
Find how many play 1 sport first
Basketball
Start with 17-8(baseball and basketball)-5(basketball and football)=4 students play just basketball
Baseball
Start with 21-8(both bballs) -6(football and baseball)=7 play just baseball
Football
Start with 24-6-5=13 play just Football
So far we have 13+7+4=24 students
Add that to the double sport players
24+8+5+6=43 students play sports
Another way is to take 21+17+24=6s and subtract the doubles
62-8-5-6=43