Out of $p$ packets being transmitted one packet will be lost - so probability of a transmission being success $= \frac{p-1}{p}.$
EXPECTED Number of Retransmissions (so first transmission can be ignored),
$E(X)=\sum_{k=1}^{\infty } k*P(k)$, where $p(k)$ is the probability of success on $i^{th}$ transmission (all i-1 transmission being failures)
$=\sum_{k=1}^{\infty } (k-1) \times \left({\frac{1}{p}}\right)^{k-1} \times \frac{p-1}{p} $
$=\frac{p-1}{p} \sum_{k=0}^{\infty }k \times {\frac {1}{p^k}}$(limit of $k$ changed to 0 from 1)
$=\frac{p-1}{p^2} \sum_{k=1}^{\infty }k \times {\frac {1}{p^{k-1}}}$(limit of $k$ changed to 0 from 1)
$= \frac{p-1}{p^2} \left(\frac{p}{p-1} +\frac{1/p}{(1-1/p)^2}\right) $ (sum to infinity of a AGP series with first term $a$, common difference $d$ and common ratio $r>1$ is $\frac{a}{1-r} + \frac{rd}{(1-r)^2})$
$1/p$ taken out to make the first erm of the series 1 for ease of calculation.
Here, $a = 1, r=\frac{1}{p}, d=1$
$= \frac{p-1}{p^2} \left(\frac{p}{p-1} +\frac{p}{(p-1)^2}\right) $
$= \frac{1}{p-1} $
PS: For stop and wait retransmission happens when either packet is lost or when ACK is lost. Here, I assumed ACK is never lost. If we also consider it answer will change and we have to replace $\frac{1}{p}$ with $\frac{2}{p}$ in probability for retransmission.