A and B play ping pong game multiple times. The person serving first has a probability p of winning that game. A serves the first game and thereafter the loser serves first.
If p(n) = pbt that A wins nth game,then: p(n) = p*p(n-1) + (1-p)*(1-p(n-1))
Is that just because:
If A wins the n-1th game, pbt he wins nth game = p.
If A loses the n-1th game, pbt he wins nth game = 1-p
I am probably missing something.
Let $p(n)$ be the probability A wins the $n$-th game. We assume that what you have written is correct, that the loser of the previous game serves first, and that the person who serves first in a game has probability $p$ of winning the game.
For any $n\ge 2$, the event "A wins the $n$-th game" can happen in two disjoint ways: (i) A won the previous game, and then wins or (ii) A lost the previous game, and then wins.
The probability of event (i) is $p(n-1)(1-p)$. For the post says that the loser of the previous game serves first. Given that A won the previous game, she does not serve first in the next, and therefore her conditional probability of winning the next is $1-p$. So the probability she wins the $(n-1)$-th game and wins the $n$-th is $p(n-1)(1-p)$.
The probability of event (ii) is $(1-p(n-1))p$. Thus $$p(n)= (1-p)p(n-1)+p(1-p(n-1)).$$
Remarks: The formula we obtained is a recurrence formula for $p(n)$. Note it is not quite the same as yours, which perhaps explains why justifying yours caused puzzlement.
One can use the recurrence formula to obtain an explicit formula for $p(n)$ as a function of $n$.
I should have changed have changed $p(k)$ to something like $a_k$ to make expressions easier to read.