Try this, (although you don't mention what's not working)
ffmpeg -s 480x270 -framerate 30 -i left.yuv -is 480x270 -framerate 30 -i right.yuv \
-filter_complex "[0:v:0]pad=iw+10:ih:color=white[l]; \
[l][1:v:0]hstack[v]" -map "[v]" left-right.YUV