We have the matrix equation in $\mathrm X \in \mathbb R^{3 \times 2}$
$$\mathrm A \mathrm X = \mathrm B$$
where $\mathrm A \in \mathbb R^{3 \times 3}$ and $\mathrm B \in \mathbb R^{3 \times 2}$ are given. Since $\mathrm A$ does not have full rank, there should be either infinitely many solutions or none. The least-squares solution is
$$\hat{\mathrm X} := \arg \min \| \mathrm A \mathrm X - \mathrm B \|_{\rm F}^2 = (\mathrm A^{\top} \mathrm A)^+ \mathrm A^{\top} \mathrm B = \lim_{t \to 0} \, (\mathrm A^{\top} \mathrm A + t \, \mathrm I_3)^{-1} \mathrm A^{\top} \mathrm B = \color{blue}{\begin{bmatrix}0 & \frac{1}{7}\\ \frac{1}{5} & \frac{4}{35}\\ \frac{3}{5} & - \frac{13}{35}\end{bmatrix}}$$
>>> from sympy import *
>>> A = Matrix([[ 1, 2, 1],
[-2,-3, 1],
[ 3, 5, 0]])
>>> B = Matrix([[ 1, 0],
[ 0,-1],
[ 1, 1]])
>>> t = Symbol('t')
Let's compute the least-squares solution:
>>> X_LS = simplify((A.T * A + t*eye(3))**-1 * A.T * B)
>>> X_LS
Matrix([
[ 4*t/(t**2 + 54*t + 105), 5*(t + 3)/(t**2 + 54*t + 105)],
[7*(t + 3)/(t**2 + 54*t + 105), 4*(2*t + 3)/(t**2 + 54*t + 105)],
[ (t + 63)/(t**2 + 54*t + 105), -(t + 39)/(t**2 + 54*t + 105)]])
>>> X_LS.subs(t,0)
Matrix([
[ 0, 1/7],
[1/5, 4/35],
[3/5, -13/35]])
Let's verify if the least-squares solution is indeed a solution to the original matrix equation:
>>> A * X_LS.subs(t,0) - B
Matrix([
[0, 0],
[0, 0],
[0, 0]])