The total number of students in the class is 38.
Since there are 5 were not allowed to read both subjects.
Let x be the number of students who read both the subject.
[tex]\begin{gathered} \text{Sum of student =38} \\ 19-x+x+16-x+5=38 \\ 40-x=38 \\ x=40-38 \\ x=2 \\ so,2\text{ students read both the subject.} \\ \text{The number of students who read only chemistry =16-x} \\ =16-2 \\ =14 \end{gathered}[/tex]