Solution:
Let xn be the number of ways in which A can get back the ball after n passes. Let yn be the number of ways in which the ball goes back to a fixed person other than A after n passes. Then
xn=3yn−1,
and
yn=xn−1+2yn−1
We also have x1=0, x2=3, y1=1 and y2=2.
Eliminating yn and yn−1, we get xn+1=3xn−1+2xn. Thus
x3=3x1+2x2=2×3=6x4=3x2+2x3=(3×3)+(2×6)=9+12=21x5=3x3+2x4=(3×6)+(2×21)=18+42=60x6=3x4+2x5=(3×21)+(2×60)=63+120=183x7=3x5+2x6=(3×60)+(2×183)=180+366=546
Alternate solution:
Since the ball goes back to one of the other 3 persons, we have
xn+3yn=3n
since there are 3n ways of passing the ball in n passes. Using xn=3yn−1, we obtain
xn−1+xn=3n−1
with x1=0. Thus
x7=36−x6=36−35+x5=36−35+34−x4=36−35+34−33+x3=36−35+34−33+32−x2=36−35+34−33+32−3=(2×35)+(2×33)+(2×3)=486+54+6=546