You almost had it.
This command overlays camera video input 1 onto the desktop video input 0 and saves it to a file. It then sends over only video 1 input to ffplay to display the preview.
For this to work well, ffmpeg expects a file format. And for it to work fast, you also have to specify audio and video codec.
Just be sure to move your preview out of the way to a second screen.
fmpeg -f x11grab -framerate 25 -video_size 1366x768 -i :0.0+0,0 \
-f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 \
-filter_complex "[1:v]scale=320:-1[cam];[0:v][cam]overlay=W-w-10:H-h-10" \
-c:a flac -qscale 0 output.mkv \
-f matroska -map 1:v -c:v copy -c:a copy pipe:1 | ffplay -i pipe:0
If you want to use fancy shorthand, you can use the - symbol instead of pipe, like this:
fmpeg -f x11grab -framerate 25 -video_size 1366x768 -i :0.0+0,0 \
-f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 \
-filter_complex "[1:v]scale=320:-1[cam];[0:v][cam]overlay=W-w-10:H-h-10" \
-c:a flac -qscale 0 output.mkv \
-f matroska -map 1:v -c:v copy -c:a copy - | ffplay -i -