Solution (source code)

= Solution
{c}

Conditional on $R_k=r$, urn 1 has $r$ red and $n-r$ blue balls, while urn 2 has $n-r$ red and $r$ blue balls. The independent selections therefore give
$$
\boxed{\begin{aligned}
\mathbb P(R_{k+1}=r+1\mid R_k=r)&=(n-r)^2/n^2,\\
\mathbb P(R_{k+1}=r-1\mid R_k=r)&=r^2/n^2,\\
\mathbb P(R_{k+1}=r\mid R_k=r)&=2r(n-r)/n^2.
\end{aligned}}
$$
Every other conditional probability is zero. The out-of-range terms at $r=0$ or $r=n$ already have zero probability. These are the transition probabilities of the <Bernoulli-Laplace diffusion model>.