Let $Y_1,Y_2,\dots$ be independent Bernoulli variables, so $P(Y_1=1)=1-P(Y_1=0)=p$ and $\tau =min\{n:Y_n=1\}$ a stopping time.
Consider the Martingale $$X_n=\frac{\exp(s\sum_{k=1}^n Y_k)}{(1-p+pe^s)^n}.$$ I need to show $E(X_\tau)=1$ and to conclude that $E(u^\tau)=\frac{pu}{1-u+pu}$.
In order to show that $E(X_\tau)=1$, I used that $\{X_{\tau \land n}\}$ is a martingale and that $E(X_{\tau \land n})=E(X_1)$.
I observed that $1-p+pe^s$ is the moment-generating function so it is $E(e^{sY_1})$. It follows that $$E(X_1)=E\left(\frac{e^{sY_1}}{1-p+pe^s}\right)=\frac{E(e^{sY_1})}{E(e^{sY_1})}=1.$$ I am not sure if I can use $\lim_{n\to \infty}E(X_{\tau \land n})=E(X_\tau)=1$. Furthermore, I do not know how to conclude $E(u^\tau)=\frac{pu}{1-u+pu}$. I am not even sure how to approach this problem or formally compute $E(u^\tau)$
You can get $E[u^{\tau}]$ directly (without martingale arguments) as $$E[u^{\tau}] = \sum_{i=1}^{\infty} u^i p(1-p)^{i-1}$$ but of course this is only finite for certain values of $u$. You can also compute $E[X_{\tau}]$ directly without martingales, notice that $\sum_{k=1}^{\tau} Y_k = 1$.
PS: Assuming $s \geq 0$ then $$(1-p+pe^s)^n\geq (1-p+pe^s) \quad, \forall n \in\{1, 2, 3, ...\}$$
So if you really want to push the limit $\lim_{n\rightarrow\infty}$ through the expectation $E[X_{\tau \land n}]$, then you can use $$0 \leq X_{\tau \land n} \leq \frac{e^s}{1-p+pe^s} \quad, \forall n \in\{1, 2,3, ...\}$$ so you can use the Lebesgue dominated convergence theorem to justify the push.