In order to determine which person is the first to win both prizes, you have to find the least common multiple to both numbers 14 and 10.
To determine what is the least common multiple number you proceed as follow:
You list different multiples of each number 14 and 10.
For 14: 14 28 42 56 70 84 98 112
For 10: 10 20 30 40 50 60 70 80
The least common multiple is 70, becasue is the first common number in each list.
Hence the 70th person in the line will win both prizes.