Let the side of the cube be 3k, 4k and 5k, respectively.
So, volumes of these cubes are 27 k3, 64k3, 125 k3 respectively.
⇒ Volume of the new bigger cube = 27 k3 + 64k3 + 125 k3
= 216k3
So, side of the new cube = 6k
Since, diagonal of the cube = √(6k)2 + (6k)2 + (6k)2
= 12√3
⇒ 108k2 = 432
⇒k = 2
So, sides of the three cubes were 6 cm, 8 cm and 10 cm respectively.