Probability/Linearity of expectation - Foxes and Hounds I came across this question on a probability problems app I found. Can't seem to get my head around it.
"Five foxes and seven hounds run into a foxhole. While they're inside they get all jumbled up, so that all orderings are equally likely.
The foxes and hounds run out of the hole in a neat line. On average, how many foxes are immediately followed by a hound?"
The given hint: Linearity of expectation will help:
frame the foxes 1,2..,5, and X_i be an indicator of whether a fox is followed by a hound. The answer is E[X_1 + ... + X_5] = E[X_1] + .. E[X_5].
I tried to individually frame each term in the aforementioned formula but I can't seem to get it right. The approach was something like this.
So for the first time I assumed a situation where there exists only one such fox-hound pair(let a be foxes and b be hounds):
bbbbbbaaaa ab.
Which is equivalent to calculating the unique ways to place one object in 11 distinguishable boxes. And so on for other number of pairs.
I also tried an approach where I calculated all the orderings with 1,2..5 pairs, i.e, "fox followed by a hound" instances, multiplied them with the respective number of pairs and divided by the total number of possible pairings, however, I wasn't able to get the right answer.
Any hints or direction towards the right approach(s) are appreciated.
Thanks!

Just imagine the foxes and hounds  all placed randomly  in a row, their position won't change when they come out.
Then P(a fox is in any position) $=\frac{5}{12}$,
and P(a hound is in any position) $= \frac{7}{12}$.
For P(get a fox immediately followed by a hound), the logic is more subtle, the probabilities of a fox-hound pair occupying any  two positions will be the same, hence the same as a fox-hound pair occupying positions $1$ and $2$.
Let $X_i$ be an indicator variable that $= 1$ if a fox-hound pair starts at $i$, and $0$ otherwise.
$P[X_i] =\frac5{12}\cdot\frac7{11} = \frac{35}{132}$
The expectation of an indicator variable is the same as its probability, 

 thus $E[X_i] = \frac{35}{132}$

Such fox-hound pairs can start  at 

 any of the first $11$ positions, 

thus by linearity of expectation, 

 $E[X] =  11\cdot\frac{35}{132} = \frac{35}{12}$ 

