Part a :The cubes displaying a solitary black face are the ones situated within the cube's interior rather than along its edges. Removing the outermost cubes on each face reveals a 3 by 3 array of cubes, each featuring paint on just one side. Consequently, there are 9 such cubes per face, each exclusively black on one side, resulting in a grand total of 9×6=54 of the smaller cubes exhibiting a single black face.
Part b: The "outer shell" of your cube has been painted, but if you take it away, it reveals a 3 by 3 cube inside, then you can multiply to get 27