Oh my GOD
Temperature will be 28 C in equilibrium with water and nail.
If you have eqations ready is simple.
Put them L one = P one and find answer for T.
Nails will lose from 40C - 12C= 28C
Water will gain heat from 20C + 8C = 28C also
very simple and time consuming but some people are...