The total area painted was 480 inches. 4 cubed is 64, 8 cubed 512. 512 +64= 576. Then you subtract two sides of the 4 inch square because the bottom is not painted and one side is pushed against the 8 inch cube. That means 576-32= 544. Then you subtract the bottom of the 8 inch cube, which means 544-64= 480.