Step 1: Calculate the total age of the students
\[ 39 \times 15 = 585 \text{ years} \]
Step 2: Calculate the total age after including the teacher
After including the teacher, the total number of people becomes 40, and the new average age is:
\[ 15 + \frac{3}{12} = 15.25 \text{ years} \]
The total age of the 40 persons is:
\[ 40 \times 15.25 = 610 \text{ years} \]
Step 3: Find the teacher's age
\[ 610 - 585 = 25 \]
Thus, the teacher’s age is 25 years.