Method 1: Seat Mark. We will use him as our reference point.
Only Ana sits next to Mark: She can be seated in two ways, to his left or to his right. That leaves $n - 2$ seats. Since Ivan cannot sit next to Ana or Mark, he may be seated in $n - 4$ ways. The remaining $n - 3$ people can be seated in the remaining $n - 3$ seats in $(n - 3)!$ ways as we proceed clockwise around the table relative to Mark. Hence, there are $2(n - 4)(n - 3)!$ such arrangements.
Only Ivan sits next to Mark: By symmetry, there are $2(n - 4)(n - 3)!$ such arrangements.
Both Ana and Ivan sit next to Mark: There are two ways to seat Ana, to Mark's left or to his right. Ivan must sit on the other side of Mark. The remaining $n - 3$ people may be seated in the remaining $n - 3$ seats in $(n - 3)!$ ways as we proceed clockwise around the table relative to Mark. Hence, there are $2(n - 3)!$ such seating arrangements.
Total: Since the three cases are mutually exclusive and exhaustive, the number of admissible seating arrangements is
\begin{align*}
2(n - 4)(n - 3)! + 2(n - 4)(n - 3)! + 2(n - 3)! &
= [4(n - 4) + 2](n - 3)!\\
& = (4n - 14)(n - 3)!
\end{align*}
Method 2: Seat Mark. We will use him as our reference point.
Choose whether Ana or Ivan sits next to him. Choose on which side of Mark that person sits. Seat the remaining $n - 2$ people as we proceed clockwise around the circle relative to Mark. This gives
$$2 \cdot 2 \cdot (n - 2)! = 4(n - 2)!$$
seating arrangements.
From these, we must subtract those arrangements in which Ana and Ivan sit next to each other. For this to happen, they must both sit on the same side of Mark. Choose which of them sits next to Mark. Choose on which side of Mark that person sits. If that person is Ana, there is only one way to seat Ivan next to her since Mark is on her other side. Similarly, if Ivan sits next to Mark, there is only one way to seat Ana next to Ivan since Mark is on his other side. Once those three seats have been filled, seat the remaining $n - 3$ people in the remaining $n - 3$ seats as we proceed clockwise around the table. There are
$$2 \cdot 2 \cdot (n - 3)! = 4(n - 3)!$$
such seating arrangements.
We must also subtract those seating arrangements in which both Ana and Ivan sit next to Mark since we have counted them twice in our initial count, once when we designated Ana as the person who sits next to Mark and once when we counted Ivan as the person who sits next to Mark. As we showed above, there are
$$2(n - 3)!$$
seating arrangements in which both Ana and Ivan sit next to Mark.
Hence, the number of admissible seating arrangements is
$$4(n - 2)! - 4(n - 3)! - 2(n - 3)! = [4(n - 2) - 4 - 2](n - 3)! = (4n - 14)(n - 3)!$$