I can only give a partial answer. I’m sure others will comment.
Combining the cameras is “stitching” (I think of stitching as fitting the edges of cameras together for a larger canvas, and compositing as overlay of one image onto part of another image, e.g., camera-in-camera). This can be done, but I’m not sure the easiest way.
Six cameras will require planning for bandwidth. Are they USB? Ethernet? What resolution and format (e.g., 1920x1080p requires a lot less bandwidth than does QUHD)? What frame rate is required?
All of the tools for developing this sort of software are free on Linux. You can’t claim ownership of the tools, and if you modify someone else’s software, then you have to stick to the license terms. Building your own software to run on Linux is rarely ever a license issue even for commercial software…so long as it isn’t in kernel space (even if it is in kernel space this is mostly not a problem for code you make available for free without encumbering someone else’s code…and no, I am not an attorney). Any kind of advice would require knowing details, but if you are developing this just for yourself then you wouldn’t need to worry about any license or fees.
There are lots of code samples around for stitching. Someone may be able to offer examples.
I’m not sure what you can do with RTSP (real time streaming protocol) so far as network options, but there is already support to some extent for that just with the right command line. Someone may be able to offer examples for this as well.