What are the rules of settling?

It is from the actual city tile, not the border of the city. So, Russia can build adjacent to your border as long as that border does not fall within 4 tiles of one of your cities.

enter image description here On the city state's border

enter image description here Suddenly a wild city appears