The length can be found using the Pythagorean Theorem...
c^2=a^2+b^2 and in this case:
d^2=(dx^2)+(dy^2)
d^2=(3-7)^2+(12-9)^2
d^2=-4^2+3^2
d^2=16+9
d^2=25
d=5
So the length of AB=5 units.
The 300th customer would be the first to recieve both. They would have given away 5 of the 20$ gift cards and 12 of the 10$ ones for a total of 17 gift cards.