Victoria refuses to sit next to either William or Xavier. Yasmin refuses to sit next to Zack. How many ways are there for the five of them to sit in a row of 5 chairs under these conditions?

Let Victoria be V, William be W, Xavier be X, Yasmin be Y and Zack be Z.

Scenario 1: V sits on an end seat.

Then, since W and X can’t sit next to V, that must mean either Y or Z sits next to V.

After picking either Y or Z, then either W or X must sit next to Y/Z.

Then, the last two people can be arranged in two ways.

Since there are two different end seats that V can sit in, there are a total of .

Scenario 2: V does not sit in an end seat.

The are 3 seats for V to choose from

In this case, then only two people that can sit next to V are Y and Z, and they

can be in either order and there are two ways to arrange W and X

So the total is 28

Adapted from http://artofproblemsolving.com/wiki/index.php/2017_AMC_10A_Problems/Problem_19