We have 4 students that read both genres, 8 that reads mysteries and 12 read science fiction. If we subtract those students that read both from the amount of students that reads mysteries, we're going to get the amount of students that ONLY read mysteries.
[tex]8-4=4[/tex]The same is valid to find those that ONLY read science fiction.
[tex]12-4=8[/tex]We have 4 students that read both genres, 4 that read only mysteries, and 8 that read only science fiction. The amount of students that read either of them is given by the sum of those 3 quatities.
[tex]4+4+8=16[/tex]The probability of taking one of them at random is given by the ratio between the amount of students that read either of them(16) by the total amount of students(30).
[tex]\frac{16}{30}[/tex]