I have a math question that I need help with:

"carbon 14 has a half life of approximately 8000 years. If a sample contains 12.5% carbon 14 and 87.5% carbon 16, how old is the sample?"

the answer is 24,000 but I can't for the life of me figure out why. any help would be greatly appreciated. thanks.