We are given the following information
Number of students who sleep 8 hours = 7
Number of students who sleep 7 hours = 6
The number of students who sleep 8 hours and 7 hours are proportional to each other.
If the students who sleep 8 hours decreases by 2 (this means 7 - 2 = 5 hours)
Then the number of students who sleep 7 hours can be found by setting up a proportion

Let us solve the above equation for x.

Therefore, the teacher should expect 30/7 hours (or 4.29 hours)