The Jews lived in Goshen (near one end of the Nile) but the Pharaoh's palace presumably was elsewhere.
So where was it that Moshe was placed in the Nile?
Ramses II built Pi-Ramses as his capital, which was in the area associated with Goshen: the upper east side of the Nile Delta.