I have a question about a thermodynamics formula I'd like to apply in my solution to a problem.
The problem is "Determine how much ice one needs to toss into boiling water of mass $m_{w}$ such that the ice completely melts and the water cools down to $0^{\circ}C$. The ice has initial temperature $-20^{\circ}C$. Assume the specific heats of ice and water are $c_{i}$ and $c_{w}$ respectively, and that the latent heat of melting ice is $L$.
My solution is to use the formula for the heat required for phase change: $\Delta Q =L\Delta m$ and equate the exchanged heat with the formula for heat exchange: $\Delta Q=cm\Delta T$.
So $Lm_{i}=c_{w}m_{w}\Delta T$ and $m_{i}=\dfrac{c_{w}m_{w}}{L}\Delta T=100\dfrac{c_{w}m_{w}}{L}$.
My question is if I correctly used $\Delta Q=cm\Delta T$. Is $m_{w}$ the correct variable to use, since the mass of water exchanging heat is $m_{w}$? Additionally, is the equality between the two equations I have used valid for this problem?