ANSWER
The population density of the square town is greater than the population density of the circular town.
EXPLANATION
The population density is the quotient between the number of people (population) and the area of each town.
Therefore, we have to find the areas first.
The circular town has a diameter of 50 miles, so its radius is 25 miles. Its area is:
[tex]A_{\text{circular town}}=\pi\cdot r^2=\pi\cdot25^2\approx1963.5mi^2[/tex]
The area of the square town is:
[tex]A_{\text{square town}}=s^2=40^2=1600mi^2[/tex]
The population density (PD) of each town is:
[tex]PD_{\text{circular}}=\frac{25,504}{1963.5}\approx12.99\text{ people/ square mile}[/tex][tex]PD_{\text{square}}=\frac{22,340}{1600}\approx13.96\text{ people/square mile}[/tex]
The population density of the square town is greater than the population density of the circular town.