Electronic and optical properties of laterally stitched MoSi2N4/XSi2N4 (X=W, Ti) 2D heterostructures