Hint: Try to find first the probability that the corner cubes are put into the corners, the face cubes into the faces and the edge cubes into the edges. Then the probability that they have the correct orientation.
Complete answer:
First, number the small cubes to make them distinguishable.
Without taking into account the orientation of the smaller cubes, there are 27! possible ways to reassemble them into a big cube.
- There is 1 way to place the center cube correctly
- There are 6! ways to place the face cubes correctly
- There are 8! ways to place the corner cubes correctly
- There are 12! ways to place the edge cubes correctly
So there are 6!8!12! correct cubes (without taking into account the orientation).
Now take such a cube.
- The center cube has probability 1 of being in the correct orientation.
- Each face cube has probability 1/6 of being in the correct orientation.
- Each corner cube has probability 1/8 of being in the correct orientation.
- Each edge cube has probability 1/12 of being in the correct orientation.
This means that the probability of getting a red cube must be
$$\frac{6!8!12!}{27!}\left(\frac{1}{6}\right)^6\left(\frac{1}{8}\right)^8\left(\frac{1}{12}\right)^{12}$$
Hint
Bayes' theorem. It will be helpful to consider the $4$ kinds of cubes: from the corner of the initial $8\times8$ cube, or from an edge, or from the interior of a face, or from inside the cube. Count how many there are of each kind (and how many painted faces they have), then the probability to roll a blank bottom for each case. Then apply Bayes' theorem.
Detailed solution
(note that the number of unpainted cubes is not $6\times64=384$ but $6^3=216$)
Corner cubes: $8$ such cubes, with $3$ faces painted (hence probability $3/6=1/2$ to roll a blank bottom.
Edge cubes (and not corner): $6$ on each edge, and there are $12$ edges, hence $72$ such cubes, with $2$ painted faces each. Probability to roll a blank bottom: $4/6=2/3$.
Face cubes (and not corner nor edge): $6\times6=36$ on each face, and there are $6$ faces, hence $216$ such cubes, with $1$ painted face each. Probability to roll a blank bottom: $5/6$.
Inner cubes: $6^3=216$ such cubes, and they have no painted face. Probability to roll a blank bottom: $1$.
Quick check: $216+216+72+8=512=8^3$.
What is the probability to roll a blank bottom (called event "blank" below)?
$$P(blank)=P(corner)\cdot P(blank|corner)+P(edge)\cdot P(blank|edge)\\+P(face)\cdot P(blank|face)+P(inner)\cdot P(blank|inner)\\=\frac{8}{512}\cdot\frac{3}{6}+\frac{72}{512}\cdot\frac{4}{6}+\frac{216}{512}\cdot\frac{5}{6}+\frac{216}{512}\cdot\frac{6}{6}=\frac78$$
Probability to have an unpainted cube given that the bottom is blank:
$$P(unpainted|blank)=\frac{P(unpainted\ and\ blank)}{P(blank)}=\frac{P(unpainted)}{P(blank)}=\frac{216/512}{7/8}=\frac{27}{56}\approx 0.48$$
Best Answer
Baye's theorem is the way to go here: let $W$ be the event the chosen cube is all white, let $R$ be the event the chosen cube has $5$ white faces, and let $E$ be the event that when the cube is rolled, five white faces appear. By Baye's theorem, $$ P(R|E)=\frac{P(E|R)P(R)}{P(E)}=\frac{P(E|R)P(R)}{P(E|R)P(R)+P(E|W)P(W)} $$ The reason for the denominator is the law of total probability, and the fact that the events $R$ and $W$ cover all possible outcomes in $E$. You should be able to fill in these probabilities.
To give this an intuitive angle, given that you see five white faces alone, all possible instances of $5$ white faces are equally likely. Six of these instances come from the cubes with one red side (one per cube), and six of these come from the central white cube. Therefore, the probability is $6/12$, not $6/7$.