Let the population at the beginning of the first year be \( P \).
Step 1: At the end of the first year, the population increases by 5\%, so the new population is:
\[
P \times 1.05
\]
Step 2: At the end of the second year, the population again increases by 5\%, giving:
\[
P \times 1.05 \times 1.05 = P \times 1.05^2
\]
Step 3: We know the population at the end of the second year is 9975. Therefore,
\[
P \times 1.05^2 = 9975
\]
Step 4: Solving for \( P \):
\[
P = \frac{9975}{1.05^2} = \frac{9975}{1.1025}
\]
\[
P = 9000
\]
Thus, the population at the beginning of the first year was 9000.