If all swimmers were children, then the receipts would total
324 * $1.25 = $405.00.
Actually, the receipts totalled $511.50, which is
$511.50 - $405.00 = $106.50 more than if all swimmers were children.
That is because some of the swimmers were adults, each paying
$2.00 - $1.25 = $0.75 more than a child.
So, with each replacement of one child with one adult, the total receipts would increase by $0.75.
So, there were
$106.50 / $0.75 = 142 replacements, adults.
Then, there actually were
324 - 142 = 182 children.
Answer: 182 children and 142 adults swam at the public pool that day.