If 2 boxes remain empty, it means that we put all three balls in one single box.
Suppose the full box is box number 1. For each ball, we have three choices - we may put it in box number 1, 2 or 3. This means that each box has a 1/3 chance of receiving each ball.
So:
So, the probability of putting all balls in box 1 is
[tex] \dfrac{1}{3}\times\dfrac{1}{3}\times\dfrac{1}{3} = \dfrac{1}{3^3} [/tex]
But this is the probability of putting all ballx in box 1, and you can repeat this logic for box 2 and 3.
So, the probability of putting all balls in one single box is 1/27 for each box, for a total of
[tex] \dfrac{1}{27} \times 3 = \dfrac{1}{9} [/tex]