When the iron and the water reach thermal equilibrium, they have same temperature,

.
We can consider this as an isolated system, so the heat released by the water is equal to the heat absorbed by the iron.
The hear released by the water is:

where

is the water mass,

is the specific heat of the water, and

is the variation of temperature of the water.
Similarly, the heat absorbed by the iron is:

where

is the iron mass,

is the iron specific heat, and

is the variation of temperature of the iron.
Writing

and replacing the numbers, we can solve to find mw, the mass of the water:
