3 judges problem. Binomial-like distribution.

I want to solve the following problem.

An indicted person is given two choices: either being tried by an individual judge, who takes the correct decision with probability p, or being tried by a three-member jury, two members of which independently take the correct decision with probability p, and the third one decides according to the result of tossing a regular coin. The decision of the jury is by majority.

a) Assuming the indictee is innocent, which option is best?

b) Assuming the indictee is guilty, which option is best? Answer both questions depending on the value of p belonging [0,1].

I am having problems with the majority concept. If the three judges where correct with the same probability "p" I would expect that the probability that the majority of judges was correct will be a Binomial (2 success out of three experiments with probability "p") but as the third judge has a probability 1/2 of being correct I am not sure on how to proceed.

Here’s the work for guilty, try to do the innocent case yourself, hint: try substituting something for p :)

Probability of being sentenced to jail by one judge = p

Probability of being sentenced to jail by the three:

Case one: homer says you’re innocent

$$\frac{1}{2} p^2$$

Case two: homer says you’re guilty

$$\frac{1}{2} (1-(1-p)^2) = \frac{1}{2} (2p-p^2)$$

Summing together:

$$\frac{1}{2} (p^2-p^2+2p) = p$$