As I understand it, you can live many weeks without food or with minimal food, but only 2-3 days maximum without water. Depending on weather
conditions, low temps can take only hours to kill you. So I would say that it is totally dependent on the situation one would find one's-self in.
Priorities would adjust to fit the situation, as best as could be done.
In freezing temperatures, since that would be the most immediate threat, I would probably seek to throw together the most effective makeshift shelter
I could. With fire vs shelter, the thing is that sometimes one wouldn't have time or ability to wander about collecting firewood (dark, blizzard etc)
and even if some were collected, more and more wood would be needed throughout the time to keep the fire fueled. A small conservative fire just won't
do it when one needs great warmth quickly. Probably the best thing to do, would be to pull together some sort of shelter, collect quickly, leaves,
brush, debris, pile it up, and burrow underneath it - this way, the body's own warmth that it radiates, can keep it warm. I would think if one's
clothes are wet, remove them, and burrow naked underneath the collected brush. Later, when the worst of the situation is over, temps rise somewhat,
then fire can be seen to, clothes dried etc, and water attained.
Shelter I think, then water, fire, food would be last for me. When needed, the body will break down its fat reserves to keep you in energy, but it
can't do this with water, water must come from an external source, and nothing will weaken you like the lack of it in your system.
After shelter and water is attained and immediate danger is not a threat, further assessment can be done (how the hell do I get out of here)
Just my opinion