Artificial intelligent assistant

How do i find the probability of this conditional probability question? It goes like this: There are two stables on a farm, one that houses 20 horses and 13 mules, the other with 25 horses and 8 mules. Without any pattern, animals occasionally leave their stables and then return to their stables. Suppose that during a period when all the animals are in their stables, a horse comes out of a stable and then returns. What is the probability that the next animal coming out of the same stable will also be a horse? I'm thinking Bayes' Rule will come into play here some how but I'm not sure.

The probability that the next animal out of the same stable will be a horse, is (probability it was stable 1 times probability next animal out of stable 1 is a horse) plus (probability it was stable 2 times probability next animal out of stable 2 is a horse).

Now, probability next animal out of 1 is a horse is (on the simplest assumption) 20/33, and probability next animal out of 2 is a horse is 25/33, so we just have to find probability it was stable 1, given that a horse came out of it (and probability it was stable 2, but that's just one minus probability it was stable 1).

Let's write it as $P(1|H)$. Presumably you have a formula for $P(A|B)$ in terms of $P(A\cap B)$ and $P(B)$. You will need to work out a few things like $P(1)$ and $P(H|1)$ and $P(H\cap1)$ --- can you see your way through this now?

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 828ad1cd1db815c258f9c49c3feced32