Let
number of children admitted = x
number of adult admitted = y
Total number admitted = 335
[tex]\begin{gathered} x+y=335 \\ 1.5x+4y=940 \\ x=335-y \\ 1.5(335-y)+4y=940 \\ 502.5-1.5y+4y=940 \\ 502.5+2.5y=940 \\ 2.5y=940-502.5 \\ 2.5y=437.5 \\ y=\frac{437.5}{2.5} \\ y=175 \\ x+y=335 \\ x+175=335 \\ x=335-175 \\ x=160 \end{gathered}[/tex]number of children = 160
number of adult = 175