Having some trouble with Borel algebra understanding
My textbook says, let $\lambda$ be the Lebesgue measure on $\mathbb{R}$ and let $A \in \mathcal{B}(\mathbb{R})$. Define a function f: $[0,\infty)\rightarrow \mathbb{R}$ by f(x)=$\lambda(A \cap [-x,x])$
Show that $\lvert\,f(x)-f(y)\,\rvert \leq 2\,\lvert\,x-y\,\rvert$.
My ideas are:
$|\lambda(A \cap [-x,x])-\lambda(A \cap [-y,y])|=|\lambda(A \cap \cap_{n=1}^\infty (-x-1/n,x+1/n))-\lambda(A \cap \cap_{n=1}^\infty (-y-1/n,y+1/n))|$
$|\lambda(A \cap [-x,x])-\lambda(A \cap [-y,y]|=|\lambda((-x,x))-\lambda(A \cap (-y,y))|$
Not sure if either are correct. It says that the Boreal algebra is the collection of all open sets (equivalent closed sets).
But does this mean that I should write $[-x,x]$ as a union of open sets (1) so that they can be joined with A. Or does it mean that $[-x,x]$ becomes $(-x,x)$ (2) because there are only open sets in the Borel algebra