When a user switches layouts are they doing through a script or by going to the layout menu and selecting another layout from the list?
If they are switching layouts through a script, you can set a variable to capture the last layout as the user leaves the layout, then create a button with a script to return to the previous layout.
You can use either Get (Layout Name) or Get (Layout Number)
Set Variable [ $lastLayout; Get (LayoutName) ]
Go to Layout [ "Other Layout" ]
[ perform script, process, etc. ]
Go to Layout [ $lastLayout ]
Just be careful. While you can give the ability to go "back" to a layout, you probably won't be able to get them back to the exact record they were looking at when they were on that layout - or even the found set they had displaying when they were looking at that layout.
Depending on your solution, that may or may not be a problem for you.
I highly recommend you take a look at BackMagic from SeedCode. It's completely free and unlocked.
You don't have to understand exactly how it works, you just copy a few custom functions, some fields, layout objects, and a single script. Just follow the step by step instructions and you'll have the whole thing done in an hour or two.
Thank you for all the suggestsions. I'll experiment and let you know what works.