I hope that somebody can help me with the following problem:

Let $A$ be a positive operator on $\mathbf{B}(\mathcal{H})$, ( $\mathcal{H}$ is a Hilbert space) with its spectral measure $E$. Show that for every Borel set $\mathbf{B}$ from the domain of $E(\cdot)$ the following equality holds $$f(\| AE(\mathbf{B})\|) = \| f(A)E(\mathbf{B})\|, $$ where $f$ is an arbitrary continuous increasing function such that $f(0)=0$. Is it also true when $f(0) \geq 0$?

I have no idea how to solve the main part. The answer for the second part is probably negative, because if I take e.g. $f(x)=x^2+1$, then

$$\| (A^2+I)E(\mathbf{B}) \| \leq \|AE(\mathbf{B})\|^2 +1$$ and the equality does not hold for every $A$.