How to construct a QST2 input file for Gaussian16 for multiple reactants and products?
TL;DR: QST2 will not work.

For QST2 calculations you need one reactant structure and one product structure, the program will then attempt a transition state guess. The essential point is, that the supplied structures have to have identical ordering (in Cartesian coordinates), or identical z-matrices, although I am not sure that this works.
For more on how to run these types of calculations, see Finding transition states in Gaussian – focus: Electrophilic Addition Reaction.

QST2 (and QST3 by extension) only make sense, if you know that you will have a single transition state - they are especially difficult to use for dissociation or association reactions because of the implied supermolecular approach. The minima $(\ce{CH3 + N})$, $(\ce{HCN + H2})$ will be very shallow and not well converged. From these structures it would be very difficult to guess the transition state, so you would at least have to supply a guess for it (QST3).

Additionally you are going from a "quintet" state (doublet + quartet) or "triplet" state (doublet + doublet, or doublet - quartet) to a singlet state (singlet + singlet). You could probably force your reactants into a broken singlet state (doublet - doublet), then it's a problem of how much sense this makes. In the other cases it is doubtful that the program will get a good guess for the electronic state of the TS.

DFT is maybe not the best methodology to investigate this kind of reaction in the first place.

In any case, here is an input file (tested with Gaussian16 rev. A.03) that will at least start running. SCF will not converge. Also reactants and products have not been optimised beforehand (which you must do). This is only for illustrative purposes.


%chk=bp86svp.chk
#P BP86/def2SVP
EmpiricalDispersion=GD3BJ
DenFit
opt(QST2,CalcFC,maxcycle=5)
gfinput gfoldprint iop(6/7=3)
nosym
pop=full

N + CH3

0 1
C        0.000000000      0.000000000      1.891780658
N        0.000000000      0.000000000     -2.108219342
H        1.029433990      0.000000000      2.255740536
H       -0.514716995     -0.891515987      2.255740536
H       -0.514716995      0.891515987      2.255740536

HCN + H2

0 1
C        0.649013613      0.189100642      0.000000000
N       -0.817143840      0.083131316      0.000000000
H        0.964811208     -1.929636661     -0.499461795
H        0.964811208     -1.929636661      0.499461795
H        1.696363276      0.452628980      0.000000000