Answer
In the end, everything will be at 0 degrees Celsius, and .18 kilograms will be ice, while the other .82 kilograms will be water.
Work Step by Step
We first find the energy it would take to get either to 0 degrees celsius:
$Q_{water}=mc_{water}\Delta T =(1)(4.184)(5)=20.92 \ kJ$
$Q_ice = mc_{ice}\Delta T =(1)(2.05)(40)=82 \ kJ$
Now, we see how much energy is involved in turning water into ice:
$Q=334m$
Thus, we see that all of the mixture will be 0 degrees Celsius, and $\frac{82-20.92}{334}=.18 \ kg$ of it will become ice.
In the end, everything will be at 0 degrees Celsius, and .18 kilograms will be ice, while the other .82 kilograms will be water.