How did you back them up? To where? (If you backed contacts up by default, only your Google account contacts were backed up to Google Contacts. Putting that account into your phone and syncing will get those contacts back. Photos depend on where they backed up to.)
You should really back a phone up to your computer, so it's always there, and you know what and where is backed up. See Backing up an Android Device.