Well hot water looses heat from convection, conductance, vapor cooling
and regasification. As hot water is heated, it looses various gases, O2, CO2, mainly. When it cools those gases will be reabsorbed from the then surrounding air. If that air is a freezer
, hey the gases are already cold and will assist in the cool down.
All that being said, a cup of 50 degree water has to loose 19 btus to freeze. A 180 degree cup of water has to loose 149 btus to freeze. The 50 degree water will freeze first every time. Now start with say 100 degree water and the 180 degree water with all the extra heat loss effects going on might catch up and pass the 100 degree water in its way to solid.
If hot water truly freezed first every time, I would want to see the perpetual motion machine too.