Big $O$ notation on both the sides of equality If $$ f(x)+O(g(x))=O(g(x)),$$
is it possible to write $$ f(x)=O(g(x))$$
and if yes, how does that work?
 A: Remark on interpretation
The equals sign in big O notation is an unfortunate but prevalent abuse of notation which makes it harder to interpret relationships such as $f(x) + O(g(x)) = O(g(x))$.
In particular, note the asymmetry: it is true that $O(n) = O(n^2)$, but it is not true that $O(n^2) = O(n)$. A clearer, but rarely used notation for $f(x) = O(g(x))$ is $f(x) \in O(g(x))$ which highlights the asymmetry. It also shows that the appropriate interpretation of $f(x) + O(g(x)) = O(g(x))$ is:
For every $h(x) = O(g(x))$, we have $f(x) + h(x) = O(g(x))$.

Proof
The relationship can be proven using the "limit" definition of big-O which says
$$
a(x) = O(b(x))\iff \limsup_{x\to\infty} \frac{|a(x)|}{b(x)} \lt +\infty.
$$
Now, $h(x) = O(g(x))$ means that
$$
\limsup_{x\to\infty} \frac{|h(x)|}{g(x)} \lt +\infty
$$
and $f(x)+h(x)=O(g(x))$ says that
$$
\limsup_{x\to\infty} \frac{|f(x) + h(x)|}{g(x)} \lt +\infty.
$$
Finally, observe that
$$
\limsup_{x\to\infty} \frac{|f(x)|}{g(x)} \le \limsup_{x\to\infty} \frac{|f(x)+h(x)|}{g(x)}+\limsup_{x\to\infty} \frac{|h(x)|}{g(x)} \lt +\infty
$$
which means that $f(x)=O(g(x))$.
A: $$f(x)+O(g(x))=O(g(x))$$
I'm not familiar with the notation of writing $O()$ on the LHS of an equation. But presumably the $O(g(x))$ on the LHS represents a functions $h(x)=O(g(x))$ such that $|h(x)|\leqslant A g(x)$ for sufficiently large $x$.
The $O(g(x))$ on the RHS represents a functions $j(x)=O(g(x))$ such that $|j(x)|\leqslant B g(x)$ for sufficiently large $x$.
So we have
$$f(x)=j(x)-h(x)$$
$$|f(x)|=|j(x)-h(x)|$$
and so by the triangle inequality
$$|f(x)|\leqslant |j(x)|+|h(x)| \leqslant (A+B)g(x)$$
and so
$$f(x)=O(g(x))$$
