Calculate the probability that at least one of Frank or Tom does sit next to Jim.

If Frank sits next to Jim, then they can be arranged 2 ways, and considered as a unit. There are 2x8! possible arrangements in this case.

If Tom sits next to Jim, then the same is true. There are 2x8! possible arrangements.

If Frank and Tom both sit next to Jim, then the three of them can be arranged 2 ways (since Jim is always in the middle), and considered as a unit. There are 2x7! possible arrangements.

So the total is 2x8! + 2x8! - 2x7! = 4x8! - 2x7!

There are 9! arrangements in general.

So the probability of at least one of Frank or Tom sitting next to Jim is

And the probability that neither of them sits next to Jim is