you can use the gauss-jordan matrix calculator to solve this.
https://matrix.reshish.com/gauss-jordanElimination.php
you set up a 3 row by 4 column matrix.
matric entries are:
column 1 column 2 column 3 column 4
variable x1 x2 x3
row 1 1 1 1 45
row 2 1 1 2 60
row 3 100 50 200 4900
run the program and here are the results.
first you set the matrix
next you input the numbers.
next it calculates the result.
x1 is the number of ancient history sections.
x2 is the number of medieval history sections.
x3 is the number of modern history sections.
your equations are:
number of sections:
1*x1 + 1*x2 + 1*x3 = 45
number of professors per section:
1*x1 + 1*x2 + 2*x3 = 60
number of students per section:
100*x1 + 50*x2 + 200*x3 = 4900
your solution is:
8 sections of ancient history.
22 sections of medieval history
15 sections of modern history.
your answer matrix is:
ancient medieval modern total
sections 8 22 15 45
teachers 8 22 30 60
students 800 1100 3000 4900
if you need to know how to do it manually, let me know.
theo