There is no need to set up and link Nintendo ID or delete game etc. The IAP is handled on Apple's side.
All you need to do is buy the game using your primary iTunes account on device A. When you've made the IAP.
:IMPORTANT: Log into device B appstore with device A apple ID
Download SMR, go through the tutorial again, remember you don't need to create a Nintendo ID at this point, but you will be asked to set a username (which can be changed at a later time).
When you finish the level 1 game tutorial, just click on purchase tab.
You will told that the game has already been purchased or linked to another account, do you want to buy again- confirm yes ( you may get the error code 40? or something and asked to confirm Apple ID password again but this all fine.
You may also have to close the app and reopen for the synch to complete.
Once that happens, all the levels are loaded!
Lastly, remember to sign out device A primary Apple ID account from device B and voila!