Read here at apple.com if you want to backup one library and transfer it to a new computer.
It is easy to put songs on an iPod. But Apple makes it impossible to get songs off your iPod back into your iTunes library. Why would you want to do this? Maybe you bought a new computer or more likely messed up your old computer. You definitely don’t backup your iTunes library like you should. So your only backup is on your iPod. You can’t sync your iPod with your iTunes because if you do then it will erase everything that is currently on your iPod. So the new music you have on your computer you can’t put on your iPod, and you can’t put your old music from your iPod into your iTunes.
The solution has arrived.
If you are using Mac OS X, then Senuti is the best option (and it’s free!).
Note: If you didn’t realize it is iTunes spelled backwards, very clever.
All you need to do is download the program, plug in your iPod, open Senuti, wait for it to recognize your iPod, select your iPod or specific playlist/songs, then hit File -> copy to iTunes library. Wait for a while for the songs to transfer, and booyah.
If you are on Windows, then I sympathize. But there is also a solution for you. It is called ephPod (also works with Linux).
This program is less intuitive to use and also unstable at times, but it is more full-featured. For instance you can put songs onto your iPod with this program, but you have iTunes for that right? (unless you are on Linux, in which case you are only torturing yourself).