See the ffmpeg filters documentation for more information. filter_complex is a really flexible command and can do much much more than is shown here. You can use this technique to overlay multiple files on top of each other, or even have a dynamic overlay. The offset is specified as overlay=x:y where x is the x offset in pixels and y is the y offset in pixels
If you want to convert (and compress) the file in one operation, you can use this one-liner to export an MP4 file with.
Note that this is a lossless (and fast) procedure, it will just copy the content from the source files.
The output.avi file will have the same video content as input2.avi, but with audio from input1.mp4. Then you can use this one-liner to copy the audio from one file to the other: ffmpeg -i input1.mp4 -i input2.avi -c copy -map 1:v:0 -map 0:a:0 -shortest output.avi