Let's say the total bill for the meal was B, and let x be the amount of money spent by the fifth person. Then the average amount spent by each person is (B+x)/5.
According to the problem, the four people spent $12 less than the average amount, so their total spending is:
4[(B+x)/5 - 12]
The total spending of all five people is equal to the total bill, so we can set up an equation:
B = 4[(B+x)/5 - 12] + x - 8
Simplifying this equation, we get:
B = (4B + 4x - 240)/5 + x - 8
Multiplying both sides by 5, we get:
5B = 4B + 4x - 240 + 5x - 40
Simplifying further, we get:
B = 9x/5 - 56
Since we want to find the amount spent by each person, we need to divide the total bill by the number of people, which is 5:
(B+x)/5 = (9x/5 - 56 + x)/5 = (14x - 280)/25
Therefore, each person spent (14x - 280)/25 dollars. We can solve for x by plugging in the fact that the fifth person spent $8 less than twice the average:
x = 2[(B+x)/5] - 8
Substituting B = 9x/5 - 56, we get:
x = 18x/5 - 56 - 8
Simplifying, we get:
7x/5 = 64
Solving for x, we get:
x = 320/7
Therefore, each person spent:
(14(320/7) - 280)/25 = $16.