Count the arrangements you do not want, which are the ones where Ana and Ben sit together, and subtract them from the total.
All seatings number 8!=40,320. For the seatings with Ana and Ben together, glue them into a block, giving 7 objects to arrange in 7!=5,040 ways, and 2! ways to order Ana and Ben inside the block.
7!×2!=5,040×2=10,080
Subtract the forbidden seatings from all of them.
40,320−10,080=30,240