Why is my Monty Hall answer wrong using Bayes Rule? The Monty Hall problem is described this way:

Suppose you're on a game show, and you're given the choice of three
  doors: Behind one door is a car; behind the others, goats. You pick a
  door, say No. 1, and the host, who knows what's behind the doors,
  opens another door, say No. 3, which has a goat. He then says to you,
  "Do you want to pick door No. 2?" Is it to your advantage to switch
  your choice?

I am interested in finding the probability of winning when you switch. I already know it's $2/3$ but I want to show it with Bayes Rule.
I tried this:
$A$ = car behind door $1$
$B$ = goat is behind door $3$
$$P(A|B) = \frac{P(B|A)P(A)}{P(B)} = \frac{1 \cdot 1/3}{1-1/3} = \frac{1}{2}$$
$P(B|A)$ = the probability that a goat is behind door $3$ given that the car is behind door $1$. This is equal to $1$ because if we know where the car is, then any other door must have a goat.
$P(A)$ = the probability of the car being behind door $1$. Assuming any door is equally likely to contain a car before we open any doors, this is $1/3$.
$P(B)$ = the probability of a goat behind behind door $3$. This is equal to $1$ minus the probability that the car is behind door $3$, so $1-1/3$.
Where is my mistake?
 A: If you define event $B$ simply as 'there is a goat behind door 3', then of course $P(A|B)=\frac{1}{2}$, for there are two options left for the car. And your use of Bayes' theorem to show $P(A|B)=\frac{1}{2}$ is also correct, for indeed with the $B$ defined this way, you have $P(A)=\frac{1}{3}$, $P(B)=\frac{2}{3}$, and $P(B|A)=1$
Put differently: asking what the chance is that door 1 has a car given that door 3 has a goat is effectively ignoring the whole 'game play' behind this problem. That is, you are not taking into account that Monty is revealing a door as a result of your choice, and whatever other assumptions are in force (such as: Monty knows where the prize is; Monty is certain to open a door with a goat; if you initially pick a door with the car, Monty will randomly pick one of the remaining two). Instead, event $B$ simply says: "there is a goat behind door $3$'. Indeed, as such, the problem statement might as well be: 

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. Oh, and another thing: door $3$ contains a goat. You pick door $1$. Is it to your advantage to switch your choice?

OK, what we need to do is take into account Monty's actions: it is indeed Monty's-act-of-picking-and-revealing-door-$3$-to-have-a-goat that is all important here.
So, instead, define $B$ as: "Monty Hall shows door $3$ to have a goat"
Notice how this is crucially different: for example, if door $1$ has the car, then door $3$ is certain to have a goat, but Monty is not certain to open door $3$ and reveal that: he might also open door $2$.
Now, let's use the standard assumptions that Monty is always sure to reveal a door with a goat and that, if both remaining doors have a goat, Monty chooses randomly between them to open.
OK, now $P(A)$ is still $\frac{1}{3}$, but otherwise things change radically with this new definition of $B$:
First, $P(B|A)$: Well, as pointed out above, this is no longer $1$, but becomes  $\frac{1}{2}$, since Monty randomly chooses between doors 2 and 3 to open up.
Next, $P(B)$: what is the probability Monty opens door 3 to reveal a goat? There are two cases to consider in which Monty opens door 3: door 1 has the car, or door 2 has the car, each having a probability of $\frac{1}{3}$ Now, if door 1 has the car then, as we saw, there is a probability of $\frac{1}{2}$ of Monty revealing door 3 to have a goat. If door 2 has the car, then Monty is certain to reveal door 3 to have a goat. So: $P(B)=\frac{1}{3}\cdot \frac{1}{2}+\frac{1}{3}\cdot 1 = \frac{1}{2}$
Plugging this into Bayes' rule:
$$P(A|B)=\frac{P(B|A)\cdot P(A)}{P(B)}=\frac{\frac{1}{2}\cdot \frac{1}{3}}{\frac{1}{2}}=\frac{1}{3}$$
I believe the difference between these two $B$'s is actually at the heart of the Monty Hall Paradox. Most people will treat Monty opening door 3 and revealing a goat simply as the information that "door 3 has a goat" (i.e. as your initial $B$), in which case switching makes no difference, whereas using the information that "Monty Hall opens door 3 and reveals a goat" (i.e. as the newly defined $B$), switching does turn out to make a difference (again, within the context of the Standard Assumptions regarding this puzzle).  And this is hard to grasp.
A: Answering my own question but this appeared to work.
Define:
$A$ = car is behind door $1$, my chosen door
$B$ = presenter opened door $3$ to show a goat
$P(B) = P(B|A)P(A) + P(B|\neg A)P(\neg A)= (1/2)(1/3) + (1/2)(2/3)$
$$P(A|B) = \frac{P(B|A)P(A)}{P(B)} = \frac{(1/2)(1/3)}{(1/2)(1/3) + (1/2)(2/3)} = \frac{1}{3}$$
I hope I did not just get lucky, though.
A: What are the hosts rules?
1) Host will randomly pick a door you didn't choose.
You chose door 1.
Case A: Car behind 3.  Host shows you 3.  Should you switch? Doesn't matter; neither door has the car.  too bad.  But this didn't happen.
Case B: Car behind 3.  Host shows you 2.  Should you switch?  Yes. 
Case C: Car behind 2. Host shows you 3.  Should you switch? Yes.
Case D: Car behind 2. Host shows you 2.  Should you switch? Doesn't matter.  But this didn't happen.
Case E & F: Car behind 1.  Host shows you 3 and 2.  Should you switch. No.
So P(A|B) = 1/2 is just fine.  It is a 1/2 chance.  This is what you calculated.
Rule 2: The host shows a random door with a goat. Here B isn't that Door 3 had a goat.  It is that the host showed you door 3.  
So... P(A) = 1/3.  Okay.  P(B|A) = 1/2. (If car is behind door 1 the probability that the host shows you door 3 is 1/2).  P(B) is... lessee.  If car is door 1 it's 1/2.  If car is door 2 it is 1.  If car is door 3 is is 0. That (1 + 1/2 + 0)/3 = 1/2.
So P(A|B) = P(B|A)P(A)/P(B) = (1/2)*(1/3)/(1/2) = 1/3.  You should switch.
