Screenshot of the Flixbus website implementing this pattern of having a departure point and a destination as input fields and a button between them allowing to swap their values.
https://files.mastodon.social/media_attachments/files/113/288/992/172/701/769/original/297ea9aefea2a946.png