Let $S_n$ be a random walk with $P(S_{n+1}=S_n+1|S_n)=p<\frac{1}{2}$ and $1-p=q=P(S_{n+1}=S_n-1|S_n)$.
Let $\tau=min(n:S_n=0)$
Prove that $S_n-(p-q)n)^2-n(1-(p-q)^2)$ is a martingale.
How do we go about proving whether a certain random variable is a martingale?
Call your random variable $X = (X_n)_n$. You need to show that $E(X_{n+1} \mid X_1, ..., X_n) = X_n$. Note that this is equivalent to $E( X_{n+1} - X_n \mid X_1, ..., X_n ) = 0$. I would suggest looking at $X_{n+1} - X_n$, and expanding some squares. Also, you can replace the conditioning on $\sigma(X_1, ..., X_n)$ by $\sigma(S_1, ..., S_n)$, since by knowing $X_1, ..., X_n$ you can determine $S_1, ..., S_n$.
Now you just need to calculate some things like $E(S_{n+1}^2 \mid S_n)$ and $E(S_{n+1} \mid S_n)$.