Real depth / apparent depth = refractive index
h1 / 6 cm = μ => h1 = 6 μ cm
h2 / 4cm = μ => h2 = 4 μ cm
h1 + h2 = 15 cm = 10 μ => μ = 1.5 cm
The bubble is in the middle of the width of the cube. So real depth from h1 one side face is equal to (15-h1) of the real depth from the opposite face.