We are giving a cube with dimentions
5x5x5
to cut into 125 equals cubes we have to make 5 horizontal cuts and 5 vertical cuts
now of these 125 cubes we have
8 are corner cubes, then they are painted red on three sides. ( 3 out of 6 sides)
3*3*3= 27 are interior cubes then they have no sides painted red (0 out of 6 sides)
9*6 =54 are cubes in front painted only one time ( 1 out of 6 sides)
12*3=36 are cubes painted 2 times(2 out of 6 sides)
then The probability of a red side facing up is giving by
then the probability of a red side facing up is
P=0.2 or 20%