

Since, of course, Preview does not offer any proper image editing tools and no way to exactly position the two images, the ImageMagick solutions posted here are preferable. (Or why not just install MacPorts' GIMP package while you're at it and enjoy a fully equipped image editor?)

This will result in a stretched version of A. This photo to painting tool will help to connect the dots on your next project. In the Tools menu, select Size and adjust the width to the sum of the width of the two images (in your example, 640 px).

This solution uses only Preview and may be handy if you can't install software on a machine. Here is a link to a useful and clever tutorial. However, if you do not mind Preview, which is part of OS X, you can do it for free.
