First thing - don't complicate the question - keep your focus on just A and B
Favourable options would be those which are concerned with the seating arrangements where 3 people are in between.
Total would be the cases that involve all seating patterns of A and B , irrespective of any condition.
Now go through ron's explanation again , and let me know in case of any doubt.
"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth."