in a group of 40 students,30 like mathematics,22 like science and 14 like both,find the number of students who like mathematics only

make a Venn Diagram

place 14 in the intersection.
Leaving the 30-14 or 16 in the "only" math part of the diagram.