I am struggling with this question:
Let $(X_n : n \geq 1)$ be a zero mean martingale in $L^2$. Show that, for $\lambda >0$, \begin{equation} \mathbb{P} \bigg( \max_{1 \leq k \leq n} X_k \geq \lambda \bigg) \leq \frac{\mathbb{E} [{X_n}^2]}{{\lambda}^2 + \mathbb{E} [{X_n}^2]}. \end{equation} This question gives a hint that martingale convergence theorem and the fact that the function $x \mapsto (x+c)^2$ is convex are needed.
To continue the hint: we have by Doob's inequality, for $c\gt 0$: $$\mathbb P\left(\max_{1\leqslant k\leqslant n}X_k\geqslant \lambda\right)=\mathbb P\left(\max_{1\leqslant k\leqslant n}(X_k+c)^2\geqslant (\lambda+c)^2\right)\leqslant \frac 1{(\lambda+c)^2}\mathbb E[(X_n+c)^2].$$ This is what we have to optimize over $c$ (the equality is true for each $c$, hence we can minimize over $c$).