I can’t see how you get the general solution for the following recursion. I can show it for the first few cases, but not the general. Can someone help?
$x_0=x_1q_1$
$x_i=x_{i-1}p_{i-1}+x_{i+1}q_{i+1}$ for all $i\geq1$,
where also $q_i=1-p_i$ and $p_0=1$ Then the general solution is given by
$x_i=x_0\frac{p_0\ldots p_{i-1}}{q_1\ldots q_i}$
Given sequence $\,(p_i),\,$ with $\,p_0=1,\,$ and $\,x_0\,$ arbitrary define the sequences
$$ q_i := 1- p_i,\;\; y_i := \prod_{k=1}^i \frac{p_k}{q_k}. $$
Also define the sequence
$$ x_i := x_0 \frac{y_i}{p_i} = x_0 \frac{y_{i-1}}{q_i} \quad \text{ since } \quad y_i = y_{i-1}\frac{p_i}{q_i}. $$
This implies that
$$ x_{i-1}p_{i-1}=x_0 y_{i-1} \quad\text{ and } \quad x_{i+1}q_{i+1} = x_0 y_i $$
which implies that
$$ x_{i-1}p_{i-1} + x_{i+1}q_{i+1} = x_0 y_{i-1} + x_0 y_i = x_0(y_{i-1}+y_i). $$
Now consider
$$ y_{i-1} + y_i = y_{i-1}\left(1 + \frac{p_i}{q_i}\right) = y_{i-1}\left(\frac{q_i}{q_i} + \frac{p_i}{q_i}\right) = \frac{y_{i-1}}{q_i}. $$
Combine the last two equations to get
$$ x_{i-1}p_{i-1} + x_{i+1}q_{i+1} = x_0\frac{y_{i-1}}{q_i} = x_i. $$
Note that to uniquely solve this for $\,x_{i+1}\,$ we must require that $\,p_i\ne 1\,$ for all $\,i>0.$
You state in your question that
This is enough to prove it in general by induction. The key step was to use $\,y_i = y_{i-1}p_i/q_i\,$ which would be one part of your induction hypothesis.