You have several options.
1) Pad the image with the smaller height with whatever background color you want so as the same size as the larger iimage, then append
You can pad by either 1) appending a solid color (or transparent) image to the top of the smaller image or 2) composite it in a solid color (or transparent) image the same size as the larger image or 3) using -extent (for -extent and gravity you need 6.3.2)
see
http://www.imagemagick.org/Usage/crop/#extent
2) Use convert ... -gravity ... -compose -composite
convert -size WxH xc:backgroundcolor leftimage -gravity southwest -compose over -composite \
rightimage -gravity southeast -composite outputimage
where H is the height of the larger image and W is the sum of the widths of the two images
Here is an example of the latter ( I use IM to compute the dimensions of the two images and then compute the required dimension for the composited image)
image1="monet3.jpg"
image2="cyclops.jpg"
w1=`convert $image1 -format "%w" info:`
h1=`convert $image1 -format "%h" info:`
w2=`convert $image2 -format "%w" info:`
h2=`convert $image2 -format "%h" info:`
ww=`convert xc: -format "%[fx: $w1 + $w2]" info:`
hh=`convert xc: -format "%[fx: max($h1,$h2)]" info:`
convert -size ${ww}x${hh} xc:black $image1 -gravity southwest -composite \
$image2 -gravity southeast -composite merge1.jpg
monet3.jpg
cyclops.jpg
merge1.jpg (resulting composite)