How to prove unique solution for equation given by $PA=QP$ Given a $n \times n$ matrix $A$ such that $A\mathbf{1} = \mathbf{1}$ i.e. the row sum equals one and a $(n-1) \times n$ matrix $P$ with kernel spanned by $\mathbf{1}$ and $P\mathbf{1} = 0$, how to prove that the equations $PA=QP$ has a unique solution $Q$?
 A: Because $P$ has full row-rank, it has a "right-inverse".  That is, there exists a matrix $B$ such that $PB = I$ (the $(n-1)\times (n-1)$ identity matrix).  Thus, 
$$
PA = QP \implies\\
PAB = QPB \implies\\
PAB = Q(PB) \implies\\
Q = PAB
$$
Note, this proves uniqueness, since we used only the fact that $PA = QP$ to get this formula for $Q$.

Given an $r \times n$ matrix $P$ with full row-rank $r$, here's a way to create a right-inverse: first, select $r$ linearly independent columns (say that the columns $i_1,\dots,i_r$ are linearly independent).  Let $M$ denote the matrix whose columns are $e_{i_1},\dots,e_{i_r}$, where $e_i$ is the $i$th column of the identity matrix of size $n$.  
The matrix $PM$ is square and invertible, since its columns are linearly independent.  The matrix $B = M(PM)^{-1}$ is a right-inverse of $P$.
Alternatively: if you're used to "pseudoinverses" and "least-squares solutions", you may prefer to take $B = P^T(PP^T)^{-1}$ (noting that $PP^T$ is invertible).

Existence: The key here is that $Px = 0 \implies PAx = 0$.  Starting with that observation, there are a few methods of proof that work.  Here's one.
We're looking for a matrix $Q$ such that $QPx = PAx$ for all $x$.  To that end, select $x_2,\dots,x_{n}$ so that $Px_1,\dots,Px_{n-1}$ is a basis of $\Bbb R^{n-1}$.  Together with $x_1 = \mathbf 1$, the $x_i$ form a basis of $\Bbb R^n$.  Thus, there exists a transformation (matrix) $Q$ so that $Q(Px_i) = PAx_i$ for all $i$. 
