so first of all we need to get rid of the time that isn't spent in class, because the question is asking about the time spent in class. so we would add 30+42 giving us 72 minutes, or 1 hour and 12 minutes. Now we can subtract 1 hour and 12 minutes from 7 hours to find the total time spent in class. Which would give us 5 hours and 48 minutes. (reminder; 60 minutes in 1 hour)
now that we have the total time spent in class, all that is left is division. The equation would be easier to solve when the hours are converted into minutes. 5 hours and 48 minutes equal, 348 minutes. Now we would divide 348 by 6 as there are 6 classes that take 348 minutes in all, and we wanna find how long 1 class takes. 348 divided by 6 would then give us 58. so each class takes 58 minutes.
(srry if the answer is wrong)