This is actually really easy. Both iPhoto and iTunes store their libraries and databases in a compact, easily transported format.
In the case of iPhoto, all you need to do is find the iPhoto Library file (which is really a folder), which is by default located in your Pictures folder, copy it to the external, then to the Pictures folder in the other place.
iTunes is a little more complicated. First of all, do you use iTunes's default library management settings (copy files to iTunes Library folder and keep iTunes Library organized)? If you do, your task is FAR easier. In this case all you need to do is copy the entire iTunes folder inside your Music folder to the external, then copy it from the external to the same place on the destination.
If you don't have it set up this way, I strongly recommend setting it up like this, since it makes moving/copying the library much simpler.