Which operating systems are on your old and new computers?
Which Adobe product is your CS5?
If both computers are Windows or both computers are Macs then you'll be fine. In CS5, launch any app then Help > Deactivate. Then uninstall.
If one is a Mac and one a Windows PC then Lightroom will be OK to transfer but not CS5.