Let's represent the number of students as "S" and the number of rooms as "R".
From the problem, we can set up the following system of equations:
Equation 1: 3S + 20 = R
Equation 2: S + 2 = (1/3)R
We can solve for S and R by substituting Equation 1 into Equation 2:
S + 2 = (1/3)(3S + 20)
S + 2 = S + (20/3)
(2/3) = (20/3) - S
S = 18
Now we can substitute S = 18 into Equation 1 to solve for R:
3(18) + 20 = R
R = 74
Therefore, there are 18 students and 74 rooms in the boarding school.