$f(x)=O(x^2), x\to 0$, then $f(x)-x=O(x^2), x\to 0$? Suppose $f(x)=O(x^2)$ as $x\to 0$, which means the big-Oh-notation.
My question is whether then
$$
f(x)-x=O(x^2)\text{ as }x\to 0.
$$
On the one hand, my answer is yes since $g(x):=x=O(x)$ as $x\to 0$ and hence $f(x)$ is the dominant term in the sum as $x\to 0$.
On the other hand, there is the summation rule, saying that
$$
f(x)-x=O(x^2-x), x\to 0.
$$

Consider $f=0$, the null function. Then $f(x)=O(x^2)$. However, $f(x)-x=-x\neq O(x^2)$.
This holds since $\frac{x}{x^2}=\frac 1x$ which is unbounded in any neighborhood of $0$.
