Assume real matrices:
$$\mathbf{A}:m\times n$$ $$\mathbf{A'}:m'\times k$$ $$\mathbf{B}:k\times n$$ $$\mathbf{c}:n\times 1$$
with the constraint that $m+m'=n$. The value of $\mathbf{Ac}$ is assumed to be known. I am looking for a condition under which the value of $\mathbf{A'Bc}$ can be computed exactly. It seems that the condition is $$rank\left(\begin{bmatrix} \mathbf{A}\\ \mathbf{A'B}\\ \end{bmatrix}\right)=m$$ based on a proof where the problem is stated, i.e., the above concatenation of matrices has full column rank. But I don't understand the reason. Is this is a necessary or a sufficient condition too?
Any row vector can be uniquely decomposed as the sum of two row vectors: a vector in the row space of $\mathbf{A}$, and the other vector orthogonal to the row space of $\mathbf{A}$ (i.e., they belong to the null space of $\mathbf{A}$).
Let $\mathbf{A}^{\perp}\in\mathbb{R}^{p\times n}$ be a matrix such that its row space spans the null space of $\mathbf{A}$, i. e., $\mathbf{A}^{\perp}\mathbf{A}^T=\mathbf{0}$. Therefore, \begin{align} \mathbf{A'}\mathbf{B}&= \mathbf{Q}\mathbf{A}+\mathbf{R}\mathbf{A}^{\perp}\\ \mathbf{c}^T&= \mathbf{q}^T\mathbf{A}+\mathbf{r}^T\mathbf{A}^{\perp}, \end{align} where $\mathbf{Q}\in\mathbb{R}^{m'\times m}$, $\mathbf{R}\in\mathbb{R}^{m'\times p}$, $\mathbf{q}\in\mathbb{R}^{1\times m}$ and $\mathbf{r}\in\mathbb{R}^{1\times p}$.
Thus, we obtain \begin{align} \mathbf{A'}\mathbf{B}\mathbf{c}&= \mathbf{Q}\mathbf{A}\mathbf{c}+\mathbf{R}\mathbf{A}^{\perp}\mathbf{c}\\ \mathbf{A}\mathbf{c}&= \mathbf{A}\mathbf{A}^T\mathbf{q}. \end{align} Since $\mathbf{A}\mathbf{c}$ has no information about $\mathbf{A}^{\perp}\mathbf{c}$, we get that $\mathbf{A'}\mathbf{B}= \mathbf{Q}\mathbf{A}$. Hence, the necessary and sufficient condition is $$ \mathrm{Rank}\left\{\begin{bmatrix}\mathbf{A}\\\mathbf{A'}\mathbf{B}\end{bmatrix}\right\}=\mathrm{Rank}\left\{\mathbf{A}\right\}.$$
In other words, $ \mathrm{Rank}\left\{\begin{bmatrix}\mathbf{A}\\\mathbf{A'}\mathbf{B}\end{bmatrix}\right\}=m$ is the necessary and sufficient condition iff $\mathbf{A}$ has full row rank.