$|\langle f, \chi _B \rangle | \leq A \mu (B)$ for all $B \in \mathcal B$ implies $f \in L^\infty$ Let $(X, \mathcal B, \mu)$ be a probability space, $f \in L^2 _\mu$. 
Assume $|\langle f, \chi _B  \rangle | \leq A \mu (B)$ for all $B \in \mathcal B$ and some $A \in \mathbb R$.

I want to prove that $\lVert f \rVert _\infty \leq A$.

This is just stated in a proof without justification, so it should be a one-liner. 
We cannot choose $B$ to be the set of points where $f$ attains its essential supremum, as it can even be empty. How can we bound the inner product "from the correct direction"?
If we bound the inner product from the wrong direction we get $|\langle f, \chi _B  \rangle | \leq \intop |f| \chi_B d\mu \leq \mu(B) \intop |f| d\mu $ Which is slightly suggestive for why the result makes sense.
 A: So $|\left<f,\varphi\right>|=\left|\left<f,\displaystyle\sum a_{i}\chi_{A_{i}}\right>\right|=\left|\displaystyle\sum a_{i}\left<f,\chi_{A_{i}}\right>\right|\leq\displaystyle\sum|a_{i}||\left<f,\chi_{A_{i}}\right>|\leq A\|\varphi\|_{L^{1}}$ for simple function $f$ in the representation that $f=\displaystyle\sum a_{i}\chi_{A_{i}}$, where $(A_{i})$ is a disjoint sequence.
For $g\in L^{1}$, choose a sequence of simple functions $(\varphi_{n})$ such that $\varphi_{n}\rightarrow g$ a.e. and $\varphi_{n}\rightarrow g$ in $L^{1}$, then Fatou's Lemma gives $|\left<f,g\right>|\leq\liminf|\left<f,\varphi_{n}\right>|\leq A\liminf\|\varphi_{n}\|_{L^{1}}=A\|g\|$.
Now use the formula that $\|f\|_{L^{\infty}}=\sup\{|\left<f,g\right>|: g\in L^{1},~\|g\|_{L^{1}}\leq 1\}$ to conclude.
Note that here we have the finite measure space, so the formula regarding $\|\cdot\|_{L^{\infty}}$ holds.
A: Suppose $f\not\in L^\infty$. Then wlog $\forall n\in\Bbb N: \mu(B_n) = \mu(\{x\in X:f(x)\ge n\})> 0$. Now:
$$A\mu(B_n)\ge\int_X f\chi_{B_n}\ge n\mu(B_n)\implies A\ge n.$$
For the inequality: suppose $\| f\|_\infty = A+\epsilon$, $\epsilon > 0$. Then, wlog $\mu(B) = \mu(\{x\in X:f(x)\ge A + \epsilon/2\})> 0$, and:
$$A\mu(B)\ge\int_X f\chi_{B}\ge (A + \epsilon/2)\mu(B)\implies A\ge A + \epsilon/2,$$
contradiction.
