Well... if all your contacts are Google contacts and not local phone contacts, then you won't have to do very much at all. I know that when I had my S3 (Verizon), you had the option of having your contacts either locally (meaning Verizon might back them up) or on Google (which get stored in your google account). I converted all my stuff to Google to avoid any porting issues...so when I got my 5, once I logged into Google for the first time, all my contacts showed up once it sync's up.
App data... that's different. Apps can store stuff in several places. Some use 'cloud' storage.. whether it be your Facebook account (Candy Crush, for instance) or they store your progress in Google Games, etc... Apps that store in the cloud will be recovered once you get the app back and logged in. Other apps store stuff locally. Here is where it can get messy. Not only will that data be coming from a different phone, it will most likely be coming from a different version of Android (between the S3 and Nexus 5). There are apps, like Titanium Backup, that can store your app data, but there is no guarantee that that app data backup will work between the two devices.
Now, one more thing....Google Play can get set up to automatically 'restore' your apps... If you log into a new phone, or log back into your current phone after doing a factory reset, Google Play will look and reinstall all those apps you had installed previously. If those apps had data stored in Google (more and more are doing this), then you'll get the app AND your data restored. But in a lot of cases, you'll just get the app back automatically (watch out if you are on a mobile data connection and don't have unlimited data!!!!). When I bought my Nexus 5.... I turned it on and went back to my car.... I noticed that it was downloading apps like mad!