Lets fill the Venn diagram. The intersection zones are the following:
where we can see that 287+214 = 501 students said they were taking Math and Dance, 214+385= 599 students said they were taking History and Dance and 212+214 =426 students said they were taking Math and History.
Lets continue with the remaining zones. Then, the final solution is: