Are you differentiating each of the individuals in the two sets of 4?
Said another way, if the 4 individuals with 5$ are Steve, Brian, Ralph, and Nigel, do these count as different queueings?
Steve, Brian, Ralph, and Nigel
Brian, Steve, Ralph, and Nigel
Nigel, Steve, Brian, and Ralph
In any case, you must have a 5$ first and a 10$ last. This limits the number of possibilities qute a bit.
What say you?