The default installation dir is /usr/lib. If you installed using your package manager they should be in /usr/lib. If you compiled your own versions of gd and libjpeg from source they've installed in the dir you defined with your ./configure script (the --prefix=.. option).
If you are unsure you can use
Code:
updatedb
locate libgd
locate libjpeg