If you have trouble with the following, do not click "Accept" yet - just reply back for further troubleshooting.
Click the "Store" option in the menubar and choose "Authorize this Computer..." and supply the Apple ID and password XXXXX used to purchase/download the lost music and apps.
Next, select the iTunes Store from the sidebar at the left. Sign in with the same Apple ID and Password, if you are not already.
In the iTunes Store, you should see a Quick Links sidebar at the right side of the page. Look for the "Purchased" option and click it.
On the Purchased page, you will see a toggle near the top-right of the page labeled as "All | Not In My Library". Select "Not In My Library".
Under Music, select "All Songs" from the listing at the left and then click "Download All" in the bottom right.
Repeat the above for "TV Shows", "Apps", and "Books"; making the appropriate choices as applicable.
When you are finished, everything should now be on the new computer.
If you would like to sync this computer with iCloud for personal data, you will need to download the iCloud Control Panel for Windows:http://support.apple.com/kb/DL1455
Once installed, go to Control Panel > iCloud and sign in with your Apple ID and password XXXXX used on the iPhone.
Hopefully, this info will answer your question. If it does, please click ACCEPT so I can be credited for my time assisting you. Experts do not earn a salary and thus our work is only recognized when it is "accepted" by the customer. If you continue to have questions on this topic, DO NOT leave negative feedback, just reply back to this thread. I will be more than happy to work with you further.
Note: When leaving feedback, please judge only my personal efforts. Do not leave negative feedback for factors outside my control; such as hardware defects, loss/lack of software or backups, or the JustAnswer website.