The first thing refers to assimilation, and the second to accommodation.
She knows that fish live in the water and they swim there, which is why she assimilated that knowledge when she saw an alligator and thought it was a big fish because it lives in the same place fish do. However, once her father explained to her that it is not a fish, she realized that there are some organisms in the water which are not fish, even though they exhibit the same qualities, which is when she accommodated her new knowledge when it came to a frog.