You will need to use wix-local storage, to save your last State when clicking on the button an redirecting to next page.
The last selected page will be saved. And when clicking the back-button you load the saved state back again from local storage.
That’s it.