The teacher works 50hours/week → this is the 100% of their work time.
40% of those 50hours/week they spend teaching their students, to calculate how many hours that is you can use cross multiplication_
100%_______50hours/week
40%_______x hours/week

The teachers spend 20hours/week teaching their students.