Start by calculating the amount of quizes
find the relation between 40 days and 120 days

this relation will give you the periods of 40 days that will happen in 120 days.
multiply the amount of quizzes by the relation factor

the teacher will give 12 quizzes in 120 days
apply the same procedure for the essays


the teacher will give 4 essays in 120 days of school