Let \( M \) represent the number of students who like music, and \( D \) represent the number of students who like dance. From the given data:
Total students = 60
Students who like music \( M = 45 \)
Students who like dance \( D = 50 \)
Students who like neither = 5
Thus, the number of students who like either music or dance or both is: \[ 60 - 5 = 55 \] Now, applying the principle of inclusion and exclusion: \[ M + D - \text{(students who like both music and dance)} = 55 \] Substitute \( M = 45 \) and \( D = 50 \): \[ 45 + 50 - \text{(students who like both music and dance)} = 55 \] Simplifying: \[ 95 - \text{(students who like both music and dance)} = 55 \] \[ \text{(students who like both music and dance)} = 95 - 55 = 40 \]
The correct option is (B): \(40\)