Depends on what you mean when you write $O(a(n)) = O(b(n))$.
Do you mean that the two set of functions are identical or are you using the (common) abuse of notation to mean $O(a(n)) \subseteq O(b(n))$?
In the former case this is wrong: $O(f(n) + h(n)) = O(\max(f(n), h(n)))$.
Notice that the first term is $O(n)$ by definition of $h(n)$, while the second term is $O(n^2)$ since the maximum is always attained by $f(n)$.
Clearly, the sets of functions $O(n)$ and $O(n^2)$ do not coincide. For example $n^{3/2} \not\in O(f(n) + h(n))$ but $n^{3/2} \in O(\max(f(n), h(n)))$.
In the second case nothing is wrong. In fact, it is true that $O(n) \subseteq O(n^2)$.
Let $d(n) \in O(n)$ and notice that, by definition of $O(\cdot)$, there exist two constants $n_0 \ge 1$ and $c > 0 $ such that $\forall n \ge n_0$, $d(n) \le c n$.
But then $d(n) \le c n \le c n^2$, showing that $d(n) \in O(n^2)$.