In my opinion, since the question is "who was the murderer?", I think A and B are both murderers since they both tried to kill C.
The big differene is A failed to do the murder while B succeeded in doing the crime.
If A and B did get out of the desert alive, I think A won't be charged of murder since there would be no evidence because the poisoned water spilled on the sands. There is also no evidence that B committed murder unless they see that B has a cutting tool and the container of C's water was cut. But why would B keep evidences with him if he knows that it can be used against him?
However, if the judge does know the facts that we know, he should charge B with murder and A with attempted murder. A can't be charged of murder because C may or may not have survived even after drinking the water that A has poisoned. No one would know what could have happened so no one would know what kind of crime could have been committed and what kind of punishment should have been given to A. We only know the fact that A attempted to kill C so we can only make judgements based on that fact. But the result of B's action has already happened so it can be judged based on what DID happen.
I also think that while A and B are murderers, C also has his own fault. Water is the most important resource that you should have in the desert so C should have been more careful with his water. The murderer succeeded because C was too careless, I mean, how could A put a poison in the water or B cut the bag of water without C noticing it?
But let's go back to the original question, the question is who was the murderer and not who will be charged of murder or what crime would be charged on A and B. If two murderers try to kill someone, both has the intention of killing, then it doesn't matter who kills that someone first, both of them are still murderers, whatever the method or the outcome of their plans might be. People who knows the story will just see them both as murderers.