Here's the question
Three prisoners, A, B, and C, are locked in their cells. It is common knowledge that one of them is to be executed the next day and the others are to be pardoned. Only the Governor knows which one will be executed. Prisoner A asks the guard a favor: "Please ask the Governor who will be executed, and then take a message to one of my friends B or C to let him know that he will be pardoned in the morning." The Guard agrees, and comes back later and tells A that he gave the pardon message to B. What are A's chances of being executed, given this information?
I need to show the solution mathematically. I don't see how this question is any different than the Monty Hall problem see here.
With that as my base I come to the conclusion that Prisoner A has a 1/3 chance of being executed. And that prisoner C would then have a 2/3 chance. Is that correct? If so how do I show it mathematically?
Edit: Mathematical solution

The only options for B being pardoned are circled. Resulting probability:
$$\frac{\frac{1}{3}.\frac{1}{2}}{\frac{1}{3}.\frac{1}{2} + \frac{1}{3}.1} =\frac{1}{3}$$
I found the solution while searching through the monty hall problem wikipedia page. They make a tree. So here it is. I've also updated the original post with this answer.
Mathematical solution
The only options for B being pardoned are circled. Resulting probability $$P =\frac{ \frac{1}{3} \times\frac{ 1}{2}}{ \left(\frac{1}{3} \times\frac{ 1}{2}\right) + \left(\frac{1}{3} \times 1\right)} = \frac{1}{3} $$
click to view calculations