You should be able to tell your version of GD from a phpinfo.php :
<?php
phpinfo();
?>
There will be a table for GD, if its been compiled into PHP, where it lists the version. It'll probably be 2.0.x unless you havent upgraded in awhile.
Imagemagick doesnt come installed by default, so you would have installed it so your imagemagick utilities are either in /usr/bin or /usr/local/bin:
You could check version with this command:
# /usr/bin/convert --version
Version: ImageMagick 5.5.5 03/01/03 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 2003 ImageMagick Studio LLC