Consider the cube whose vertices are the $8$ points $(x,y,z)$ for which each of $x$, $y$ or $z$ is $0$ or $1$. Find the number of ways to colour the vertices white or black such that, for any vertex, if all its neighbours are the same colour, then it is also of the same colour.(Two vertices are neighbours if they are the endpoints of some edge of the cube)
My solution: Divide the 8 vertices into 2 sets P and Q, such that each set contains 4 vertices, any two of which are diagonally adjacent across a face of the cube. We shall do case work based on the number of vertices of each colour in set P. Let 'B' denote black and 'W' white.
Case 1: 4B. All vertices in set Q must be Black. So $1$ possible colouring here.
Case 2: 4W. Same as above. So $1$ possible colouring here.
Case 3: 3B,1W. The white vertex in set P can be choosen in ${4 \choose 1}=4$ ways. One of the vertex in set Q surrounded by three Black must also be Black, and the other 3 colours could be in any configuration except all of them being Black. So $4*(2^3-1)=28$ possible colourings here.
Case 4: 3W+1B. Same as above. So $28$ possible colourings here.
Case 5: 2W+2B. The white vertex in set P can be choosen in ${4 \choose 2}=6$ ways. We cannot have all black vertices in set Q surrounding any of these two white vertices in set P. Also, all 4 vertices in set Q cannot be of the same colour. These account to all possible forbidden cases. So a total of $6*(2^4-(2+2)-2)=60$ possible colourings here.
So the total possible ways to colour the cube is $2*(1+28)+60=118$.
Is there any other way to do this question?
It was a good move to consider the two tetrahedra $P=\{(0,0,0),(1,1,0),(1,0,1),(0,1,1)\}$ and $Q$. I also agree with your cases and the handling of the first four cases. In case ${\bf 5}$ I would argue as follows, with the same result:
Case ${\bf 5}$: 2W+2B.$\ $ The two white vertices of $P$ can be chosen in ${4\choose2}=6$ ways. The resulting coloring of $P$ does not contain a monochromatic triangle, hence $Q$ could be colored arbitrarily in $2^4$ ways. But the coloring of $Q$ must not contain a monochromatic triangle encircling a differently colored vertex of $P$. This excludes the monochrome colorings of $Q$ and $4$ colorings of type $3/1$, one for each vertex of $P$. It follows that there are $16-2-4=10$ admissible colorings of $Q$.
The final number then is $118$.