The first person to receive both a ticket and a gift cards would have to be in the position in line represented by the lowest multiple of 5 and 6. The least common multiple of 5 and 6 can be found to be 30 when you do 5*6. Therefore, the 30th person will be the first to receive both prizes.
Hope this helps