Answer:
a)

b) 5464 inhabitants.
Explanation:
The formula used for compound interest becomes very helpful in this case.

Knowing this, we can easily calculate the value for any year, counting from the original 5000.
From this formula, we can derive a specific one that will serve for any value of t.
a)

b) Apply the formula:

The town will have 5464 inhabitants.