Let's use algebra to solve this problem. Let x be the number of 30-minute lessons that the teacher gave last week, and let y be the number of 60-minute lessons. We know that the teacher gave a total of 9 lessons, so we can write:
x + y = 9
We also know that the total time spent on lessons was 7 hours, which we can convert to minutes:
30x + 60y = 420
Now we have two equations with two unknowns, which we can solve using substitution or elimination. Let's use substitution:
x + y = 9 -> y = 9 - x
30x + 60y = 420 -> 30x + 60(9 - x) = 420
Simplifying and solving for x:
30x + 540 - 60x = 420
-30x = -120
x = 4
Therefore, the teacher gave 4 30-minute lessons last week. To find the number of 60-minute lessons, we can substitute x = 4 into either equation:
x + y = 9 -> y = 9 - x -> y = 9 - 4 -> y = 5
So the teacher gave 5 60-minute lessons last week.