Suppose that the feight of water in the container =hcm and the side of the cube is x cm .
Now from conservation of mass
pi 3^2 h + 0.9x^3 -x^2h = 4^3.............(1)
And from archemedes' law
x^3 *0.9 = x^2h ......................(2)
from (2) h=0.9x
from (1) h= 64/9pi
x = 64/(9pi*0.9)= 2.515 cm