Acceptance-Rejection Technique Theorem Proof I am assigned to discuss the acceptance-rejection technique in our class. I have trouble understanding the last part of proving its theorem.
The theorem goes like this:

The acceptance-rejection algorithm generates a random variable X such
that $\mathbb P\{X=j\}=p_j$, $j=0,1...$
In addition, the number of iterations of the algorithm needed to
obtain $X$ is a geometric random variable with mean $c$.

The proof goes like this:

(I'm not really good at this so I just attached a picture)
I don't quite understand how it turned $1/c$ and then $p_j$ in the last two parts of the proof.

The probability a proposal is accepted is the sum over $j$'s that the value $j$ is (1) generated and then (2) accepted:
\begin{align}\mathbb P(\text{proposal accepted})&=\sum_{j=1}^\infty \mathbb P(\text{proposal accepted and }Y=j)\\
&=\sum_{j=1}^\infty \mathbb P(\text{proposal accepted }|Y=j)\mathbb P(Y=j)\\
&=\sum_{j=1}^\infty \frac{p_j}{c}=\frac{1}{c}\sum_{j=1}^\infty {p_j}=\frac{1}{c}
\end{align}
(The argument is much more straightforward when considering continuous densities as it corresponds to a ratio of areas, $1$ under the target versus $c$ under the proposal. The picture below is taken from our Monte Carlo book.)
$\qquad\qquad\qquad$
The probability that an accepted value is equal to $j$ is the probability that a value $j$ is proposed and accepted divided by the probability a value is accepted:
\begin{align}\mathbb P(X=j)&=\mathbb P(Y=j|Y\text{ is accepted})\\
&=\dfrac{\mathbb P(Y=j\text{ is accepted})}{\mathbb P(\text{proposal is accepted})}\\
&=\dfrac{p_j/c}{1/c}=p_j
\end{align}
