before you do anything to each computer, go download the latest display driver uninstaller....
http://www.wagnardmobile.com/DDU/downloads.html
then download the latest amd drivers on the i5 computer that the hd5400 will end up in, and download the latest nvidia drivers on the i7 computer that the gtx460 will end up in.
then disconnect each computer from the internet so they dont auto update.... and run DDU and let it do the clean safe mode uninstall of the old drivers.
then UNPLUG the computers from the wall and swap the video cards. be easy and dont force the video cards in or out, but do make sure they are both seated properly in the pcie lane. also dont forget to plug the power pins from the power supply back into the video cards.
then restart each system and install the video drivers that you downloaded from amd and nvidia.