Question 883711
I had a version of this in my textbook, so I made the numbers the same and have pasted an image of the pages of solution attached below. (If it cannot be seen, here is the solution in brief):

You set up four simultaneous equations in the unknowns, X, Y, Nx, Ny, where
 = sum of all points scored by all those who passed, X=summ of all points scored by all those who failed, Nx=number who failed, Ny=number who passed.

(1)   {{{ N_x + N_y = 120 }}}
(2)   {{{ Y/N_y = 35 }}}
(3)   {{{ X/N_x = 15 }}}
(4)   {{{ (X+Y)/120 = 35. }}}

You can practise the algebra, or use Maxima,

(%i1) solve([Ny+Nx=120,35=(X+Y)/120,39=Y/Ny,15=X/Nx],[Ny,Nx,X,Y]);
(%o1)              [[Ny = 100, Nx = 20, X = 300, Y = 3900]]

Here's the LaTeX:
*[illustration LaTeX_solution_write_up].