In the question as the cube is initially just floating the density of the cube=density of water
Afterwards when the temperature is increased ;
The increase in volume of water is proportional to
The increase in volume of cube is proportional to the volume expansion coefficient of cube I.e
So for water Vfinal =Vinitial .(1+)
For cube Vfinal =Vinitial.(1+)
(V is volume)
So as the mass is constant
For water Dfinal of water=Dinitial/(1+)
For cube Dfinal of cube=Dinitial/(1+)
Cube will sink if Dfinal of cube>Dinitial of water
I.e Dinitial /(1+)>Dinitial/(1+)
As Dinitial is same for both