According to this Photoshop CS5 should be compatible with Mac OS X 10.9:
Mac OS X Mavericks (10.9) compatibility FAQs | CC, CS6, Acrobat
After downloading the installer and installing on the new computer you need to enter the serial number (or whatever the proper name is) to register Photoshop.
One is entitled to install Photoshop on two computers, but if another installation should already exist you should get a warning and you may have to deactivate the installation on the old computer (Help > Deactivate).