How to prove that $O(n) \cdot O(n^2) = O(n^3)$? Would the solution be something like

let $fn \in O(n)$ so $ fn \le c1 \cdot n$  and  $ gn \in O(n^2) $ so $ gn \le c2 \cdot n^2$ where $c1,c2$ constants

so $ fn*gn \le C \cdot n^3$ so $ fn*gn \in O(n^3)$ so $O(n) \cdot O(n^2) = O(n^3)$
Yes, you are exactly right.

Maybe even $$fn \cdot gn \leq c_1 n \cdot c_2 n^2 \leq C n^3 = O(n^3)$$ for more clarity.



note: When speaking of complexity classes, the equality sign is often used insted of $\in$ which would be formally more correct.

If you also need to prove $O(n^3) \subseteq O(n) \cdot O(n^2)$, the argument would go the same similarly (see comments below for details).
Recall that

$$O(n)=\omega_1(n)\cdot n \quad \limsup_{n\to \infty} |\omega_1 (n)|=c_1\in \mathbb{R}$$

$$O(n^2)=\omega_2(n)\cdot n^2 \quad \limsup_{n\to \infty} |\omega_2 (n)|=c_2\in \mathbb{R}$$

therefore

$$O(n) \cdot O(n^2)=\omega_1 (n)\cdot\omega_2(n)\cdot n^3=\omega_3(n)\cdot n_3=O(n^3)$$

indeed

$$\limsup\left|\omega_3(n)\right|\le\limsup\left|\omega_1 (n)\right|\cdot \limsup\left|\omega_2(n)\right|=c_1\cdot c_2=c_3\in \mathbb{R}$$