Let x = number of students enrolled in both Science and Arts.
Then the number of students taking Science only is 17 – x and,
the number of students taking Arts only is 19 – x.
We know that
Total # of students in class = # Science only + # Arts only + Both Arts & Sciences + # Any
= (17 – x) + (19 – x) + x + 2
= 38 + x
This should be equal to 30 as given. So,
38 – x = 30
Subtract 38 from both sides:
–x = –8
So x = 8.
Answer: 8