the question isn't clear
if we have 5 places , can James be first and Jessica fifth ? or Jassica has to be second.
when James first and jassica has to be second:
4! = 4*3*2= 24
John, James, Rick, Jessica, and Ryan
since James has to be before Jessica
the we look at James-Jessica as one
so total ways of all of them is 5!, and if James-Jessica is one then 4!
when James first and jassica can be second,third and so on...
4! + 6*3+6*2+6*1 = 60
4! - see above
6*3 = 18
6*2 = 12
6*1 = 6
explanation:
when James first jassica can be third,fourth,fifth - no. of times James can be first = 6 , no. of ways jassica can be third,fourth, fifth = 3
when James second jassica can be third,fourth,fifth - no. of times James can be second = 6 , no. of ways jassica can be fourth, fifth = 2
when James second jassica can be third,fourth,fifth - no of times James can be third = 6 , no. of ways jassica can be fifth = 1
then the answer is 60 (was edited !)