How does adding big O notations works can someone please explain how adding big O works.
i.e. $O(n^3)+O(n) = O(n^3)$
why does the answer turn out this way? is it because  $O(n^3)$ dominates the whole expression thus the answer is still $ O(n^3)$

The formal definition for equalities which contain $\;O(\cdot)\;$ and related notations, is that these notations are sets, and that such an equality holds if it holds for every function in each left hand side set, and for some function in each right hand side set.
(Anyone: Feel free to insert a reference; I don't have one at hand.)
Therefore $$
O(n^3)+O(n) = O(n^3)
$$ is formally an abbreviation for $$
\langle \forall f,g : f \in O(n^3) \land g \in O(n) : \langle \exists h : h \in O(n^3) : \langle \forall n :: f(n) + g(n) = h(n) \rangle \rangle \rangle
$$  (I won't go into the proof of this statement here; the first answer should help you there.)
Note how this general definition applies to the special case of $$
f(n) = O(g(n))
$$ where it gives us $$
\langle \exists h : h \in O(g(n)) : \langle \forall n :: f(n) = h(n) \rangle \rangle
$$ which can quicky be simplified to the usual $$
f \in O(g(n))
$$
