How many ways are there to put 6 balls in 3 boxes if the balls are distinguishable, and the boxes are distinguishable?
The first ball can go in any of the 3 boxes, that is 3 ways
the second ball can go int any of the 3 boxes that together with the first ball is 3*3=3^2=9 way
so for 6 balls it would be 3^6 ways.