Explaination of the solution to the problem

Please explain the solution to the problem
https://www.geeksforgeeks.org/ways-color-3n-board-using-4-colors/ .
As in editorial,it is not that clear.


Please refer to this video.