How to back up iPhoto and iTunes using Dropbox
I've done something similar to this, only mine is on a network drive, but the same steps apply.

First, we need to copy your libraries to your Dropbox folder. So open a new Finder window and make sure you're in your Home folder.

For iTunes:

Navigate to Home > Music. You should see a folder named iTunes here. Copy this folder to your Dropbox, wherever you want it stored at there.

Now, if iTunes is in your Dock, hold ALT/OPTION and click the icon. If not, go back to Finder and navigate to Applications. Find iTunes in the Applications folder and do the same, hold ALT/OPTION and click the icon.

iTunes will open and ask you to choose a library. (If it bugs you about not being able to find the folder first, ignore it. We're about to fix that.) Click "Choose Library" and navigate to the iTunes folder you copied to Dropbox earlier. Select this folder and click open. iTunes will take a few moments to respond, but if all worked correctly, it will open up and you will see all of your music and such there.

For iPhoto:
Now, navigate back to Home, only this time, open the Pictures folder. You should see a file named iPhoto Library. Copy this folder to your Dropbox, wherever you want it stored at there.

Now, if iPhoto is in your Dock, hold ALT/OPTION and click the icon. If not, go back to Finder and navigate to Applications. Find iPhoto in the Applications folder and do the same, hold ALT/OPTION and click the icon.

iPhoto will open and ask you to choose a library. (If it bugs you about not being able to find the folder first, ignore it. We're about to fix that.) Click "Choose Library" and navigate to the iPhoto folder you copied to Dropbox earlier. Select this folder and click open. iPhoto will take a few moments to respond, but if all worked correctly, it will open up and you will see all of your photos there.

NOTE: Keep in mind, one caveat to using this method is that you should only have iTunes or iPhoto open on a single machine at a time. Running it on more than one machine may result in some problems. Dropbox keeps the latest copy of a file, and quite often, while iTunes and iPhoto are running, they write to their main library file (think of it as a journal of what they're doing, including settings and changes like that). If computer A writes to the file and Dropbox syncs it, then computer B goes to write to the file, computer B might overwrite something it wasn't expecting to be there, corrupting the file.

Long-story short, this method will keep your libraries in sync and available on any of your Dropbox devices. Just use caution if you choose to run iTunes or iPhoto on more than one machine at a time using this method.

Also, as far as being backed up, the music will be stored on Dropbox, so you can always get it back if your Mac dies or crashes. However, just remember, if you move or remove any files from the libraries in Dropbox, you won't have a spare copy. I highly recommend using Time Machine or another backup solution, and having it include your Dropbox folder to protect against this potential scenario.

I know this was a lot of info, moreso on the warning side than the actual "how-to", but I'd rather give you a heads up now so you don't run into the same problems I've had in the past.

Good luck, and enjoy your music and pictures!