There is 2 ways to get it working. The first is quite simple; Install Windows 7 on one machine, don't activate it. Then run Sysprep, and move it to the other machine, and then when the computer initialises itself you do everything as you normally would.
Or, start the installation process to the other machine, but when the computer finishes installing and is about to restart to initialise the motherboard drivers, unplug the hard drive and switch to the Ryzen machine.
Edit (I forgot to actually specifically tell you what you can do with your current installation): Download all the new drivers you'll need onto your computer, run sysprep, and move the hard drive to the new computer. It should work fine, though you'll need to re-enter your old registration key.