Initially ice have low temperature and water has higher temperature. So ice will absorb heat from water and water will dissipate heat. Once the temperature of both comes to same the heat transfer will stop. Here we need to consider some additional thing. At -10C ice is a solid. When it comes to 0C solid ice it will absorb the latent heat to convert solid ice to liquid water at 0C.

First we check how much of energy we want to convert -10C to 0C water.

Total energy required(Q1)

= (Energy to convert water from -10C ice to 0C ice) + (latent heat of fusion of ice to make 0C water from 0C ice)

`= 40*2.108*10+40*334`

`= 14.2KJ`

Lets consider how much heat that 25C water can supply when it comes to 0C water.