I have a $2\times3$ grid which is colored with four colours. How many colourings do there exists such that every two adjacent squares have different colours? I don't know how to start.
Color the grid by columns (top and bottom cells) going from left to right:
You have $4\cdot 3=12$ ways to color the $1$st column. Now given that you've made your choice of colors for the $1$st column, the number of ways to color the $2$nd column will drop down from $12$ to $7$. The same happens for the 3rd column, once you've colored the $2$nd one . So the total number is $$12\cdot 7 \cdot 7=588.$$