Let me first state the problem first
Let $X$ and $X'$ be two $n$-vertex graphs with adjacency matrices $A$ and $B$ respectively . An $n \times n $ permutation matrix $P$ encodes an isomorphism $\pi$ from $X$ to $X'$ if and only if $P$ is a solution to the following $0$-$1$ integer linear program: $$AP =PB$$ $$ \sum_{i=1}^{n}{P_{ij} = 1}, 1\le j\le n$$ $$ \sum_{j=1}^{n}{P_{ij} = 1}, 1\le i\le n$$ $${P_{ij}} \in \{0,1\}, 1 \le i,j\le n. $$
one direction I have tried like this, assume $\pi$ is a bijective map ( one-one and onto) and let $P$ is a matrix corresponding to the map $\pi$, but I am not able to reason why it will satisfy the equation $AP =PB$.
I need to prove the claim in the bolded text.