Gambler's Ruin Problem with Simple Solution - Different Approach
Hint: The equations $$ P\left(X_{i+1}\right) - 2P\left(X_i\right) + P\left(X_{i-1}\right)=0\ \ \ \mathrm{for}\ i=1,2,\dots,7 $$ constitute a second-order linear recurrence whose general solution is $\ P\left(X_n\right) = a + bn\ $ for $\ n=0,1, \dots, 8\ $, and some constants $\ a\ $ and $\ b\ $. The boundary conditions, $\ P\left(X_0\right) = \frac{1}{2} + \frac{1}{2}P\left(X_1\right)\ $, and $\ P\left(X_8\right) = \frac{1}{2}P\left(X_7\right)\ $, give you two linear equations to solve for the values of $\ a\ $ and $\ b\ $.
The equation $$P(X_i) = \frac{1}{2}\left(P(X_{i-1}) + P(X_{i+1})\right) \: \: \: \; (*)$$ holds for $i \in\{0,2,3,...8\}$ since $P(X_{-1})=1$ and $P(X_9)=0$. Write $$Q_i=P(X_i)-P(X_{i-1})$$ for $i=0,1,\ldots,9$. Then by doubling (*) and subtracting $P(X_{i-1}) + P(X_{i})$ from both sides, we get that $$Q_i = Q_{i+1} $$ holds for $i \in\{0,2,3,...8\}$. Since $\sum_{i=0}^9 Q_i=-1$ we conclude that $Q_i=-1/10$ for all $i$. In particular $P(X_0)=1+Q_0=9/10$.