$\textbf{Problem 4.}$ The number of perfect inhabitants of a city was a perfect square, in other words, a whole number squared. with $100$ people plus the new number of inhabitants turned out to be a perfect square plus one. Now, with another increase of $100$ people, the number of inhabitants is again a perfect square. What was the number of inhabitants original city?
1. Let the original number of inhabitants be \( n^2 \), where \( n \) is an integer.
2. After increasing the population by 100, the new number of inhabitants is \( n^2 + 100 \).
3. According to the problem, \( n^2 + 100 \) is one more than a perfect square. Let this perfect square be \( m^2 \). Therefore, we have:
   \[
   n^2 + 100 = m^2 + 1
   \]
   Simplifying, we get:
   \[
   n^2 + 99 = m^2
   \]
4. After another increase of 100 people, the number of inhabitants becomes \( n^2 + 200 \).
5. According to the problem, \( n^2 + 200 \) is a perfect square. Let this perfect square be \( k^2 \). Therefore, we have:
   \[
   n^2 + 200 = k^2
   \]
6. We now have two equations:
   \[
   m^2 = n^2 + 99
   \]
   \[
   k^2 = n^2 + 200
   \]
7. Subtract the first equation from the second:
   \[
   k^2 - m^2 = (n^2 + 200) - (n^2 + 99)
   \]
   Simplifying, we get:
   \[
   k^2 - m^2 = 101
   \]
8. We can factor the left-hand side using the difference of squares:
   \[
   (k - m)(k + m) = 101
   \]
9. Since 101 is a prime number, the only factor pairs are (1, 101) and (-1, -101). We consider the positive pair:
   \[
   k - m = 1
   \]
   \[
   k + m = 101
   \]
10. Solving these two equations simultaneously:
    \[
    k - m = 1
    \]
    \[
    k + m = 101
    \]
    Adding these equations, we get:
    \[
    2k = 102 \implies k = 51
    \]
    Subtracting the first equation from the second, we get:
    \[
    2m = 100 \implies m = 50
    \]
11. Substitute \( m = 50 \) back into the equation \( m^2 = n^2 + 99 \):
    \[
    50^2 = n^2 + 99
    \]
    \[
    2500 = n^2 + 99
    \]
    \[
    n^2 = 2401
    \]
    \[
    n = 49
    \]
12. Therefore, the original number of inhabitants was \( n^2 = 49^2 \).

The final answer is \( \boxed{49^2} \).