Here $A$ is a non-invertible symmetric matrix but $(X^TAX)$ is invertible, $A^{+}$ represents the pseudo-inverse of $A$. $N(X^T)$ and $N(A^T)$ denote left null space of $X$ and $A$ respectively.
Now, how to show $X(X^TAX)^{-1}X^T=A^+$ if and only if $N(X^T)=N(A^T)$?
Let $A$ be $n\times n$. Since $X^TAX$ is supposed to be invertible, it follows that $X$ is $n\times m$ with $m < n$ and $X$ is injective. In turn, $X^T$ is surjective. Note also that $\mathbb R^n = N(A)\oplus R(A)$ as $A$ is symmetric. $R(A)$ is invariant under $A$. Let $B := A|_{R(A)}$. Then $B$ is an invertible linear map and $$ A^+ = B^{-1}P_{R(A)}, $$ where $P_{R(A)}$ is the orthogonal projection onto $R(A)$. In particular, $N(A^+) = N(A)$.
(a) Let $A^+ = X(X^TAX)^{-1}X^T$. This implies $N(X^T)\subset N(A^+) = N(A)$. Now, if $x\in N(A)$, then $X(X^TAX)^{-1}X^Tx = 0$. Hence, for all $u\in\mathbb R^n$ we have $$ 0 = \langle X(X^TAX)^{-1}X^Tx,u\rangle = \langle (X^TAX)^{-1}X^Tx,X^Tu\rangle. $$ As $X^T$ is surjective, it follows that $(X^TAX)^{-1}X^Tx = 0$ and thus $x\in N(X^T)$.
(b) Assume that $N(X^T) = N(A)$ (and thus $R(X) = R(A)$) and put $L := X(X^TAX)^{-1}X^T$. We have to show that $L = A^+$. For this, let us first prove that $ALA = A$. For $y\in R(X)$, $y = Xx$, we have $$ ALAy = AX(X^TAX)^{-1}X^TAXx = AXx = Ay. $$ As $ALAy = Ay$ for $y\in N(A)$ holds trivially, we have proved $ALA = A$. This also gives $ALz = z$ for $z\in R(A)$. And since $ALz = 0$ for $z\in N(A) = N(X^T)\subset N(L)$, we have that $AL = P_{R(A)}$. In particular, $AL$ is symmetric. As also $L$ is symmetric, this gives $LA = (AL)^T = AL$. Thus, also $LA$ is symmetric and $$ LAL = X(X^TAX)^{-1}X^TAX(X^TAX)^{-1}X^T = X(X^TAX)^{-1}X^T = L. $$ This proves that $L = A^+$ (see https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse#Definition).