Application of Doob's inequality 
Suppose that $X_n$ is a martingale with $X_0 = 0$ and $EX^2_n < \infty$. Show that 
  $$P\left(\max_{1\leq m \leq n} {X_m} \geq \lambda\right) \leq \frac{EX^2_n}{EX^2_n+\lambda^2}$$
  by using the fact that $(X_n+c)^2$ is a submartinagle.

So far, I have tried to manipulate $P(\max_{1\leq m \leq n} X_m \geq \lambda) $ into the form of $$P\left(\max_{1\leq m \leq n} (X_m + c)^2 \geq \lambda^2 + EX^2_n\right)$$ by finding an appropriate $c$ that yields the inequality, but it does not seem to work. How should I proceed?
The problem is from Durrett Exercise 5.4.5.
 A: Observe that
$$\max_{1\leq m \leq n} X_m \geq \lambda \Leftrightarrow \max_{1\leq m \leq n} X_m + c \geq \lambda + c \implies \max_{1\leq m \leq n} \lvert X_m + c \rvert \geq \lambda + c$$
$$\max_{1\leq m \leq n} \lvert X_m + c \rvert \geq \lambda + c \Leftrightarrow \max_{1\leq m \leq n} \lvert X_m + c \rvert^2 \geq (\lambda + c)^2$$
The second relation is true if $\lambda + c \geq 0$. For now, suppose that this is the case.
Then you have $$P\{\max_{1\leq m \leq n} X_m \geq \lambda\} \leq P\{\max_{1\leq m \leq n} \lvert X_m + c \rvert^2 \geq (\lambda + c)^2\}$$
Apply Doob's inequality to the RHS to obtain
$$P\{\max_{1\leq m \leq n} \lvert X_m + c \rvert^2 \geq (\lambda + c)^2\} \leq \frac{1}{(\lambda + c)^2}E[\lvert X_n + c \rvert^2] = \frac{1}{(\lambda + c)^2}(E[X_n^2] + c^2)$$
On the last equality I made use of the fact that $E[X_n] = E[X_0] = 0$ (martingale property). Now we want to find a lower bound for this last expression by choosing the optimal $c$. Differentiating this expression with respect to $c$ and equating it to $0$ gives the optimal $c$ as $\frac{E[X_n^2]}{\lambda}$. Substitute this $c$ into $\frac{1}{(\lambda + c)^2}(E[X_n^2] + c^2)$ to finish the exercise.
Note that the optimal $c$ satisfies the assumption we made $\lambda + c \geq 0$ if $\lambda \geq 0$. That should be stated somewhere in the question. However, I think that the $\max$ expressions should run from $0$ instead of $1$, in which case $\lambda \geq 0$ becomes a natural starting point.
