Add an instance variable "id" to portal sprites, set different ids for each portal, you can use numbers or text (say, "park_west_entrance"). Add another instance variable "target_id", set correct target/exit ids for it too. For example the eastern portal in City3 will have target_id="park_west_entrance".
When the character enters a portal, save Portal.target_id in a global variable Spawn_ID. On start of the new layout, spawn the character at the portal with id=Spawn_ID.