Given fat matrices $\mathrm A, \mathrm B \in \mathbb R^{16 \times 512}$, we have the following linear matrix equation in $\mathrm X \in \mathbb R^{16 \times 16}$
$$\mathrm X \mathrm A = \mathrm B$$
We have $16 \cdot 512$ equations in $16^2$ unknowns. Thus, we have a severely overdetermined system with $32$ times more equations than unknowns. Hence, let us look for a least-squares solution
$$\hat{\mathrm X} := \arg\min \| \mathrm X \mathrm A - \mathrm B \|_{\text{F}}^2$$
Minimizing $\| \mathrm X \mathrm A - \mathrm B \|_{\text{F}}^2$, we obtain the normal equations
$$\mathrm X \mathrm A \mathrm A^{\top} = \mathrm B \mathrm A^{\top}$$
If $\mathrm A$ has full row rank, then $\mathrm A \mathrm A^{\top}$ is invertible and, thus, the unique least-squares solution is
$$\boxed{\hat{\mathrm X} = \mathrm B \mathrm A^{\top} \left( \mathrm A \mathrm A^{\top} \right)^{-1}}$$
Plugging this least-squares solution into the original linear matrix equation, we obtain
$$\hat{\mathrm X} \mathrm A = \mathrm B \, \underbrace{\mathrm A^{\top} \left( \mathrm A \mathrm A^{\top} \right)^{-1} \mathrm A}_{=: \mathrm P_{\mathrm A^{\top}}} = \mathrm B \mathrm P_{\mathrm A^{\top}}$$
where $\mathrm P_{\mathrm A^{\top}}$ is the projection matrix that projects onto the column space of $\mathrm A^{\top}$, i.e., onto the row space of $\mathrm A$. The least-squares solution is a solution to the original matrix equation if and only if
$$\mathrm B \mathrm P_{\mathrm A^{\top}} = \mathrm B$$
or, alternatively, if and only if
$$\mathrm P_{\mathrm A^{\top}} \mathrm B^{\top} = \mathrm B^{\top}$$
We conclude that the least-squares solution is a solution to the original matrix equation if and only if the columns of $\mathrm B^{\top}$, i.e, the rows of $\mathrm B$, are in the row space of $\mathrm A$. If that is the case, then the $16$ entries of the $k$-th row of $\hat{\mathrm X}$ tell us how to weight the $16$ rows of $\mathrm A$ in order to build the $k$-th row of $\mathrm B$.