We know that 312 students enrolled in the curse, and if we assume that no one deserts, we can infer the equation:

As P is the passing students and F is the failing students.
From the second statement, 7 times the number of students passed as failed, we can infer the equation:

With the same meaning of the variables.
Then we can replace F in (1), we have:


And from (2):

Then the correct answer would be:
Passing students: 39
Failing students: 273