Answer
Gallium will freeze first, Water will freeze second and Mercury will freeze last.
Work Step by Step
The freezing point of water is $0^{\circ}$
The freezing point of mercury is $-39^{\circ}$
The freezing point of gallium is $29.8^{\circ}$
Starting at $40^{\circ}$ as the temperature decreases the substance with the highest freezing point will freeze first.
So gallium will freeze first, water will freeze second and mercury will freeze last.