No. of students who failed only in Maths= 20 (Given)
According to condition given,
Students who failed in Maths and English only + Students who failed in Science and Maths only + Students who failed in all three papers= 30-20= 10.
Therefore, 6+8-x=10 (x being the number of students who failed in all three subjects)
Solving the above equation gives x=4
Student who failed in:-
All three subjects=4
Maths and English only=2
Maths and Science only=4
Science and English only=6
English only=16
Science only=18