Since there are 6 students with neither brown hair nor blue eyes, the remaining number of students with at least one of the characteristic is 24. The sum of the students with brown hair only, with blue eyes only, and with both should be equal to 24. By letting x be the number of students with both, the equation that would best represent the given is,
(15 - x) + x + (17 - x) = 24
The value of x from the equation is 8.