Here a general formula for the table will be given.
Step 1: Given distinct $a_1, a_2, \cdots$ and $b_1, b_2, \cdots$, define $A_n = \{a_1, \cdots, a_n\}$ and $B_n = \{b_1, \cdots, b_n\}$ for $n \geqslant 0$, and$$
\mathscr{F}_{m, n} = \{φ: A_m → A_m \cup B_n \mid φ \text{ is injective},\ φ(x) ≠ x,\ \forall x \in A_m\},\\
f(m, n) = |\mathscr{F}_{m, n}|,
$$
where $m, n \geqslant 0$. Then for $n \geqslant 0$,$$
f(0, n) = 1, \quad f(1, n) = n,\\
f(m, n) = (m + n - 1)f(m - 1, n) + (m - 1)f(m - 2, n). \quad (m \geqslant 2)
$$
Proof: Obviously $f(0, n) = 1$. For $m = 1$, since $φ(a_1) \in B_n$, then $f(1, n) = n$. Now consider $m \geqslant 2$.
If $φ(a_1) \in B_n$, then intuitively$$
φ|_{A_m \setminus \{a_1\}}: A_m \setminus \{a_1\} \longrightarrow (A_m \setminus \{a_1\}) \cup \bigl( (B_n \setminus \{φ(a_1)\}) \cup \{a_1\} \bigr)
$$
corresponds to a mapping in $\mathscr{F}_{m - 1, n}$ and thus$$
|\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) \in B_n\}| = n f(m - 1, n). \tag{1}
$$
If $φ(a_1) = a_i$ and $φ(a_i) = a_1$, then intuitively$$
φ|_{A_m \setminus \{a_1, a_i\}}: A_m \setminus \{a_1, a_i\} \longrightarrow (A_m \setminus \{a_1, a_i\}) \cup B_n
$$
corresponds to a mapping in $\mathscr{F}_{m - 2, n}$. If $φ(a_1) = a_i$ but $φ(a_i) ≠ a_1$, then intuitively$$
φ|_{A_m \setminus \{a_1\}}: (A_m \setminus \{a_1, a_i\}) \cup \{a_i\} \longrightarrow \bigl( (A_m \setminus \{a_1, a_i\}) \cup \{a_1\} \bigr) \cup B_n
$$
corresponds to a mapping in $\mathscr{F}_{m - 1, n}$. Thus$$
|\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) \in A_m\}| = (m - 1) (f(m - 1, n) + f(m - 2, n)). \tag{2}
$$
Combining (1) and (2) yields$$
f(m, n) = (m + n - 1)f(m - 1, n) + (m - 1)f(m - 2, n).
$$
The rest of this proof focuses on rigorously proving (1) since (2) can be proved analogously.
By symmetry,$$
|\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) \in B_n\}| = n·|\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) = b_1\}|.
$$
On the one hand, for $φ \in \mathscr{F}_{m, n}$ such that $φ(a_1) = b_1$, define $ψ: A_{m - 1} → A_{m - 1} \cup B_n$ as$$
ψ(x) = \begin{cases}
b_1; & x = a_i,\ φ(a_{i + 1}) = a_1\\
a_j; & x = a_i,\ φ(a_{i + 1}) = a_{j + 1}\\
b_j; & x = a_i,\ φ(a_{i + 1}) = b_j
\end{cases},
$$
then $ψ \in \mathscr{F}_{m - 1, n}$. Note that this defines an injective mapping from $\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) = b_1\}$ to $\mathscr{F}_{m - 1, n}$, thus$$
|\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) = b_1\}| \leqslant f(m - 1, n).
$$
On the other hand, for $ψ \in \mathscr{F}_{m - 1, n}$, define $φ: A_m → A_m \cup B_n$ as$$
φ(x) = \begin{cases}
b_1; & x = a_1\\
a_{j + 1}; & x = a_{i + 1},\ ψ(a_i) = a_j\\
a_1; & x = a_{i + 1},\ ψ(a_i) = b_1\\
b_{j + 1}; & x = a_{i + 1},\ ψ(a_i) = b_{j + 1}
\end{cases},
$$
then $φ \in \mathscr{F}_{m, n}$ and $φ(a_1) = b_1$. Note that this is an injective mapping from $\mathscr{F}_{m - 1, n}$ to $\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) = b_1\}$, thus$$
f(m - 1, n) \leqslant |\{φ \in \mathscr{F}_{m, n} \mid φ(a_1) = b_1\}|.
$$
Therefore (1) holds.
Step 2: Given distinct $a_1, a_2, \cdots$, $b_1, b_2, \cdots$, and $c_1, c_2, \cdots$, define $A_n = \{a_1, \cdots, a_n\}$, $B_n = \{b_1, \cdots, b_n\}$, $C_n = \{c_1, \cdots, c_n\}$ for $n \geqslant 0$, and$$
\mathscr{G}_{k, m, n} = \{φ: A_m \cup B_{n - m} → A_m \cup C_{n - m} \mid φ \text{ is injective with exactly } k \text{ fixed points}\},\\
g(k, m, n) = |\mathscr{G}_{k, m, n}|,
$$
where $k \leqslant m \leqslant n$. Then$$
g(k, m, n) = (n - m)!\, C(m, k) f(m - k, n - m).
$$
(Note that $g(k, m, n)$ is the number of prizes of class $k$ if there are $m$ matching numbers out of $n$ in total.)
Proof: There are $C(m, k)$ ways to select $k$ fixed points from $A_m$, then $f(m - k, n - m)$ ways to select the images of the rest $m - k$ elements of $A_m$, and then $(n - m)!$ ways to select the images of elements in $B_{n - m}$. Thus$$
g(k, m, n) = (n - m)!\, C(m, k) f(m - k, n - m).
$$