Question 1191509
<font color=black size=3>
P = total prize money in dollars
n = number of people
n-1 = all but one person


All but one took $9 each, so we have (n-1)*9 = 9n-9 dollars taken. 
The amount of money left over is P-(9n-9) = P-9n+9 which is set equal to the stated $5


P-9n+9 = 5
P = 5+9n-9
P = 9n-4


In the second scenario, all n workers took $8 each. 
They took a total of 8n dollars. 
There is $12 left over, so,
P - 8n = 12


Now apply substitution
P - 8n = 12
9n-4 - 8n = 12
n-4 = 12
n = 12+4
n = 16
There are 16 office workers total.
If all but one (aka 15 people) take $9 each, then we have 15*9 = 135 dollars taken. Add on the leftover $5 to get to 135+5 = <font color=red>$140</font>


Or you can compute P like this
P = 9n-4
P = 9*16-4
P = 144 - 4
P = <font color=red>140</font>


Yet another way is to do
P - 8n = 12
P = 8n+12
P = 8*16+12
P = 128+12
P = <font color=red>140</font>
Like with many topics in math, there are multiple routes to take. 
Feel free to use your favorite.



Answer: <font color=red>140 dollars</font>
</font>