You probably got 486 by plugging values into the expression in the 2nd last part. However this gives the total number of ways under the assumption that not all colours have to be used.can someone explain the last question plz

i got 486

To remove these cases, firstly note that it is impossible to use one colour to colour the grid, so we consider the cases with 2 colours. From 3 coliurs, we can choose 2 colours in 3c2 ways, and for each combination of 2 colours, there are two ways they can be used to colour the grid. So our final answer is 486-3c2*2 =480 as stated above