Neither A nor B are guilty for killing C! A poisoned the water but C did not drink poisoned water so that rules A out. B cut a hole into C's water bag however this does not mean that C will definitely die from this, there is still a possibility that C, in fact all three of them could have found water in the desert and could quench their thirst. B unintentionally saved C's life for C would surely have drunk the poisoned water which would then have meant that A was the murderer. Since that did not happen C died simply of a lack of water which is probably what happened to all of them!
Now that they are all dead there is no one to stand trial. Case dismissed!