Let’s choose 4 colors from 7 in 7C4 ways.
Now out of the 4 choosen colors, the 1st vertex can have 4c1 ways, 2nd vertex have 3c1, 3rd vertex have 2c1 ways and the 4th will have 1c1 ways.
Mathematically we can write this as 7c4*4c1*3c1*2c1.
But since in the question “” There is a condition that adjacent vertices should not be of the same color”
The chromatic number of the graph is 5
So the final vertex needs to assigned with different color. So among the remaing 3 colors we can do it in 3c1 waYS.
So the final eq becomes 7c4*4c1*3c1*2c1*3c1=2520