While I do not have code I can provide for this exact page, I can suggest a approach. Assuming each “page” is stored in a MultiStateBox you can store the next and previous page index within variables.
If the user clicks on the RadioButtonGroup that triggers the condition, use onChange() to save the appropriate next page within the variable.
Finally, you can use the next and previous page index variables and changeState() to configure the arrows to change to the correct index.