By default retroarch uses the guide button to bring up the ui, this can be changed in the retroarch input settings to something different. I personally have it left like that as its nice and quick to jump into the quick menu to save/load states. In launchbox/bigbox I have exit emulators set to hold back button and then press start, this can be configured under the automation setting, just choose any button you want as a button to hold down, then pick another button to actually close the emulators. Hope this helps.