Answer
Without the heat sink: $T_2=466.2°C$
With the sink: $T_2=41.0°C$
Work Step by Step
Assuming all the heat is transfered to the device.
a)The energy balance for this system is:
$Q=\Delta U \rightarrow \dot{Q}\Delta t= mc(T_2-T_1)$
Given $\dot{Q}=25\ W, \Delta t=5\ min,\ m=0.02\ kg,\ c=850\ J/kg.K, T_1=25°C$,
and solving for the final temperature: $T_2=466.2°C$
b) In this case the energy balance becomes:
$Q=\Delta U_{device}+\Delta U_{sink} \rightarrow \dot{Q}\Delta t= (m_{device}c_{device}+m_{sink}c_{sink})(T_2-T_1)$
Given $m_{sink}=0.5\ kg,\ c_{sink}=902\ J/kg.K$:
solving for the final temperature: $T_2=41.0°C$