in that case, create a new file in illustrator, "place" both pictures in the file, arrange them the way you like and then export them as a jpeg. illustrator will create a jpeg containing only the stuff in the file so you don't have to worry about the canvas size (like A3 or A4) of your file.