You cannot copy from one machine to another, but your license allows you to install and activate on two machines for non-simultaneous use by a single user.
Be advised, however, that CS4 is not supported on Yosemite, so you're on your own with the install.
Never try to migrate from one computer to another computer, this will not work.
I doubt that CS4 will run without problems, so you should consider to subscribe to the Creative Cloud.
If you will try to install it, make an image file with the disk utility of all installer CDs, copy it on an USB stick, mount these installers and install it from there. But you are on your own.