Step 1: Find the total age, in 2000, of the 80 teachers who did NOT retire.
The 20 teachers who retired in 2002 had an average age of 60 in 2002, so 2 years earlier, in 2000, their average age was \( 60 - 2 = 58 \), giving a total age of \( 20 \times 58 = 1160 \). Since the total age of all 100 teachers in 2000 was \( 100 \times 50 = 5000 \), the 80 teachers who stayed had a total age in 2000 of \[ 5000 - 1160 = 3840 \]
Step 2: Age this group of 80 directly up to 2008.
From 2000 to 2008 is 8 years, so each of these 80 teachers is 8 years older by 2008, adding \( 80 \times 8 = 640 \) to their total age: \[ 3840 + 640 = 4480 \]
Step 3: Age the 40 new teachers directly up to 2008.
The 40 teachers who joined in 2005 had an average age of 38 that year, and from 2005 to 2008 is 3 years, so by 2008 their total age is \[ 40 \times (38 + 3) = 40 \times 41 = 1640 \]
Step 4: Add both totals and divide by the total number of teachers in 2008.
\[ \text{Total age in 2008} = 4480 + 1640 = 6120, \quad \text{Total teachers} = 80 + 40 = 120 \] \[ \text{Average age} = \frac{6120}{120} = \boxed{51} \]