Step 1: Defining the variables.
Let the average age of the class before the replacement be \( \text{Avg} \). The total age of all students is given by: \[ \text{Total Age} = \text{Avg} \times 20 \] Step 2: Using the change in average.
After the replacement, the average age reduces by 2 months. Therefore, the new average is: \[ \text{New Avg} = \text{Avg} - 2 \text{ months} \] The total age of the students after the replacement is: \[ \text{New Total Age} = (\text{Avg} - 2) \times 20 \] Since one student of age 18 years is replaced, the difference in the total age is: \[ \text{Difference in Total Age} = \text{New Student's Age} - 18 \] This difference must be equal to the change in the total age, which is 40 months (since 2 months per student for 20 students equals 40 months): \[ \text{New Student's Age} - 18 = 40 \] Step 3: Solving for the new student’s age.
\[ \text{New Student's Age} = 40 + 18 = 58 \text{ months} = 4 \text{ years} 10 \text{ months} \] Step 4: Converting to years and months.
Thus, the new student's age is 14 years 8 months.
Final Answer: \[ \boxed{14 \text{ years } 8 \text{ months}} \]