f(n) = O(n^2) means that there exists a constant k1 such that as n grows

large:

|f(n)| < k1 |n^2| = k1 n^2

g(n) = O(n^3) means that there exists a constant k2 such that as n grows

large:

|g(n)| < k2 |n^3| = k2 n^3

Now:

|f(n) + g(n)| <= |f(n)| + |g(n)| < k1 |n^2| + k2 |n^3|

but for large n |n^2|<|n^3|, so:

|f(n) + g(n)| <= |f(n)| + |g(n)| < k1 |n^2| + k2 |n^3| < (k1+k2) |n^3|

which implies that:

f(n)+g(n) = O(n^3).

RonL