Consider such a problem: $$\mathbf A\mathbf x=\mathbf b$$ where the vectors $\mathbf x$ and $\mathbf b$ are known.
I want to find a positive semidefinite matrix $\mathbf A$ satisfying the aforementioned equation.
What conditions do $\mathbf x$ and $\mathbf b$ need to satisfy?
Thanks a lot.

I have chosen to provide the general ($n$ dimensional case) as a separate answer. I will use the letter $Y$ instead of $B$, i.e., being given $X$ and $Y$, find a symmetric positive semi-definite matrix $A$ such that
$$AX=Y$$
Let $s=X^TY$ be the dot product of $X$ and $Y$.
As remarked by @Fenris, a necessary condition for the existence of $A$ is that $s \ge 0$.
It is in fact sufficient. Here is why.
Let $\{U_1, U_2, \cdots U_{n-1}\}$ be any basis of the orthogonal subspace to $X$; then a solution is
$$A=\sum_{k=1}^{k=n-1} \alpha_k U_kU_k^T+\dfrac1s YY^T$$
for any sequence $\alpha_1,\cdots \alpha_{n-1}$ of positive numbers (s is assumed $\ne 0$). Indeed,
$$AX=\sum_{k=1}^{k=n-1} \alpha_k U_k\underbrace{U_k^TX}_0+\dfrac1s Y\underbrace{Y^TX}_s=Y$$
and for any vector $V$:
$$V^TAV=\left(\sum_{k=1}^{k=n-1} \alpha_k V^T U_k U_k^T V\right)+\dfrac1s V^TYY^TV = \sum_{k=1}^{k=n-1} \alpha_k\left(U_k^T V\right)^2+\dfrac1s(Y^TV)^2 \ge 0$$
establishing that $A$ is positive semi-definite.
Remark: a very particular case is obtained by taking all the $\alpha_k=0$...