Every 7th person get 10 dollar coupon
Every 18th person gets a 25 dollar coupon
That means the first number that is a multiple of both 7 and 18 is the number of the person who will get the coupon.
You are looking for the lcm of 7 and 18.
Because they have no common factors multiply them so the 126th person is the first one to get both coupons.