John has US and foreign stamps in his album. The ratio of the number of US stamps to foreign stamps is 5 : 2. After Paul gives him 12 foreign stamps, the ratio becomes 2 : 1. Find the number of US stamps he has.
d=number of domestic stamps
f=number of foreign stamps
substitute d in first equation: