The probability that Fido and Rover (two dogs) are in adjacent cages is $$\frac{17}{\binom{18}2}=\frac19,$$ because there are $\binom{18}2$ choices for the (unordered) pair of cages to put them in, and $17$ pairs of adjacent cages.
To get the expected value, multiply this probability by the number of same-species pairs of animals: $$\frac19\cdot3\cdot\binom62=5.$$ The expected value is $5$.