The message Syncing iPhone with this iTunes library will replace media from another iTunes library occurs because iTunes will only synchronise with one library at a time. So when you try to synchronise your phone with the library on your new computer, iTunes is warning you that if you do so it will remove the media that came from the previous library.
Note also, that sync is one way, you cannot copy music from the phone into iTunes.
The solution for your music from CDs, is to copy the music files from your old computer onto a memory stick, or drive, and paste them onto your new computer, then add them to your new iTunes Library, using the iTunes option File/Add Folder to Library (or, for individual songs, File/Add File to Library). Copy the entire Music folder, which should include the iTunes control file as well, which maintain you play counts and ratings etc. Ensure that you put copies onto your new computer; if you simply add the files that are on the external drive to your library, rather than adding the copies you put on your computer, iTunes will lose track of the songs once you disconnect the drive. 
That's for CDs. For music purchased from the iTunes Store, sign into your store account in iTunes on your new computer and download your purchases from the store to your iTunes Library.
Once your new library matches your old library, you can proceed with a sync of your phone with your new computer's iTunes Library. Yes, it will remove the media from the previous library, but since your new library contains everything that was in the old library, your phone will have all the music that it had before.
Note also, that backing up your phone to your computer does not include music on the phone. You need to back up (always a wise idea) your music yourself. Use Windows Explorer to back up (and maintain) the folders with music in them to a suitable external drive.