Make sure that both layouts are based on the same table occurrence. That's it.
Since such layouts share the same found set (at least in the same window), all you – well, your button – need to do is switch to the other layout. This is commonly used to switch between a form and a list layout while keeping your found set and your position within it.
A couple of other options:
1. Put the detail fields into a popover
2. If you wish to open the detailed layout in a new window, then use the Find Matching Records script step, and match to your primary key field