Further away than the city that caused the warning in the first place. Exactly how much further, I'm not sure.
One trick, if you suspect you'll get a warning, is to settle several offending cities in a line in one turn. You only get one warning from the civ and you have then filled all the area you need.
Another trick, almost always employed by the AI, is to forward-settle and back-fill. If you settle deliberately close, leaving a large gap between that city and the rest of your civilization, then you promise not to do it again when they complain, you can fill in the gap with impunity AND you get diplomatic kudos for keeping to an agreement. Doing things the opposite way and gradually creeping toward their borders risks repeated dings and yields a smaller overall settlement area.