If 40 people contribute, the amount raised is $4000, because each contributes $100.
The question doesn’t say what happens if more or fewer than 40 contribute, so the question seems open to different interpretations.
Let’s suppose the first contributor contributes $99, so 4 additional people contribute, making 5 in all. If each of these contributes $99, the total amount contributed so far is 99+4×99=$495. But for each of these 4 people, 4 more contributors are added, making 16 contributors. So far, this would make 21 contributors and $2,079 if the new additions each contributed $99. With no limit on the number of contributors, the total contributions is unlimited, if the pattern continues. The equation would be 33(4ⁿ-1), where n is the number of “generations” of contributors. 2079=33(4³-1) for n=3.
Now, let’s suppose that the first contributor contributes $90, so 10 additional people contribute, making 11 in all. If each new contributor contributes $90, then $990 would be raised so far. But each new contributor brings in a further 10 contributors, making a total so far of 111. The equation would be 10(10ⁿ-1) for an indefinite succession of contributors.
Another interpretation would be to put a limit on the number of contributors. The question doesn’t give a maximum, but just states that, if there are 40, each contributes $100.