Let the seat occupied by A be numbered as 1 and the remaining 5 seats be numbered as 2, 3, 4, 5, 6 in clockwise direction. There arise three cases :
Case I: B is on right of A, i.e., at number 2.
Then seat number 3 can be occupied by either C or D.
If C occupies seat number 3, then other 3 can be arranged in 3! ways.
If D occupies seat number 3, then C can sit on 4 or 5 and other 2 can be arranged in 2! ways.
Number of ways 3!+2×2!=10
Case II: C is on the right of A i.e., at number 2.
Then, B can occupy any seat from number 3 or 4 or 5. Then, D must be on the right of B, so we are left with two persons and 2 seats, which can be occupied in 2! ways.
Number of ways 3×2!=6
Case III: C is on the left of A i.e., at number 2.
(Note: B can't be on the left of A)
Then, if B occupies seat number 5, then other 3 can be arranged in 3!=6 ways
If B occupies seat number 4 or 3, then D will be on 5 or 4 respectively. Other 2 can be arranged in 2! ways.
Number of ways 6+2×2!=10
Total number of ways from all the three cases is 10+6+10=26