If you have an image with a plain background that is too short or narrow, here's how you can extend it using GIMP 2.x. Note that extending an image is not the same as stretching an image using a transformation; important elements in the image are not distorted, just moved (see ASCII art below).
+----+ +------+
|A B| ==> |A B|
+----+ +------+
- Open the image file.
- Select menu item Image / Canvas.
- In Set Image Canvas Size dialog, uncheck the link between Width and Height, enter the required dimensions, then press the Resize button.
- Select menu item Layer / Layer to Image Size. You have to extend the background layer because you cannot see any part of the image beyond the background layer's boundaries.
- Use Rectangle Select Tool, select area to move, then copy selection to clipboard.
- Paste selection into image (which creates a Floating Selection in the Layers dialog).
- Move the selection to the required position in the layer. If you want to precisely place the selection, you should zoom in and use the cursor keys.
- When you are satisfied with the position of the selection, use Layer / Anchor Layer to put it back into the background layer.
- Use the Color Picker Tool to select a colour, then use a Pencil Tool or Paintbrush Tool to touch up the background.
Note that you can only move the selection after you have created a Floating Selection, which confused me initially because I thought that just copying a selection would give me an object to move.