Let x be the number of 5 point questions and y be the number of 15 point questions.
So we have,
5x+15y = 350 ....... (1)
Also, x + y = 40
So,
[tex]\begin{gathered} x+y=40 \\ x=40-y \end{gathered}[/tex]Substituting the value of x in first equation,
[tex]\begin{gathered} 5(40-y)+15y=350 \\ 200-5y+15y=350 \\ 10y=150 \\ y=15 \end{gathered}[/tex]Therefore,
[tex]x=40-15=25[/tex]Thus, there are 25 questions of 5 points and 15 questions of 15 points.