If the particle is at state $i$, then the probability that it will be at state $j$ after $n$ transitions is the probability that $(n − i + j)/2$ of these steps are to the right and $n − [(n − i + j)/2] = (n + i − j)/2$ are to the left.
How do we get the formula $(n − i + j)/2$?
Suppose a particle on the number line moves in $n$ unit steps (each step is $\pm 1$) from position $i$ to position $j$, where $i,j$ are integers.
Let $L$ be the number of steps to the left, and let $R$ be the number of steps to the right.
Then for fixed $i,j,n$, we get the system \begin{cases} R+L=n\\[4pt] i+(R-L)=j\\[4pt] \end{cases} of $2$ equations in the $2$ unknowns $R,L$.
Solving the system for $R,L$ yields the fornulas in question.