Use the QR decomposition to obtain a matrix $\mathbf{Q}$ whose columns form an orthonormal basis for the column space of $\mathbf{A}.$
Then you can set $\mathbf{V}=\mathbf{Q}\mathbf{Q}^T\mathbf{X}$ and $\mathbf{W}=\mathbf{X}-\mathbf{V}
=(\mathbf{I}-\mathbf{Q}\mathbf{Q}^T)\mathbf{X}.$
The columns of $\mathbf{V}$ are contained in the column space of $\mathbf{A},$ because the leftmost factor of $\mathbf{Q}\mathbf{Q}^T\mathbf{X}$ consists of columns that form a basis of that space.
The columns of $\mathbf{W}$ are orthogonal to it, because
$$
\mathbf{Q}^T\mathbf{W}
= \mathbf{Q}^T(\mathbf{I}-\mathbf{Q}\mathbf{Q}^T)\mathbf{X}
= (\mathbf{Q}^T-\mathbf{Q}^T\mathbf{Q}\mathbf{Q}^T)\mathbf{X}
= (\mathbf{Q}^T-\mathbf{I}\mathbf{Q}^T)\mathbf{X} = 0
$$
Uniqueness of the solution
Let $\mathbf{B}$ be a matrix whose columns form a basis of the column space of $\mathbf{A}.$ Assume that there are two solutions $v_1+w_1=v_2+w_2=x$ for a column $x$ of $\mathbf{X},$ such that $v_1$ and $v_2$ are in the column space of $\mathbf{B},$ and $w_1$ and $w_2$ are orthogonal to it. This means, there are vectors $u_1$ and $u_2$ such that
$$
v_1=\mathbf{B}u_1 \\
v_2=\mathbf{B}u_2
$$
and
$$
\mathbf{B}^Tw_1 =0 \\
\mathbf{B}^Tw_2 =0
$$
From $v_1+w_1=v_2+w_2$ we get $v_2-v_1 = w_1-w_2.$ We have
$$
0= \mathbf{B}^Tw_1-\mathbf{B}^Tw_2
=\mathbf{B}^T(w_1-w_2) \\
=\mathbf{B}^T(v_2-v_1)
=\mathbf{B}^T(\mathbf{B}u_2-\mathbf{B}u_1)
=\mathbf{B}^T\mathbf{B}(u_2-u_1)
$$
$\mathbf{B}^T\mathbf{B}$ is invertible (the columns of $\mathbf{B}$ form a basis of a subspace of $\mathbb{R}^k$). Therefore, we can solve $\mathbf{B}^T\mathbf{B}(u_2-u_1)=0$ for $u_2-u_1.$ We get $u_2-u_1=0$, which in turn means $v_1=v_2$ and $w_1=w_2.$ Each column of $\mathbf{X}$ has a unique decomposition, which means that the whole matrix $\mathbf{X}$ has a unique decomposition.