Let m be the mass of both cubes. If the smaller cube has side length x, then its volume is x ³. The side lengths of the larger cube have length 4x, so the larger cube's volume is (4x)³ = 64x ³, or 64 times as large as the smaller cube.
The first cube has a density of m/x ³, while the larger one has a density of m/(64x ³) = 1/64 m/x ³, so the ratio of densities is (1/64):1, or 1:64 (larger cube to smaller cube).