Simplifying this expression with big O when several variables are involved
All is correct, but - it can be done in one step after you represent this expression as a sum of terms:
$$\mathcal{O}(3m+2m⋅n⋅p+p⋅n+p⋅m)=\mathcal{O}(m⋅n⋅p)$$
because:


The term $(m⋅n⋅p)$ dominates all the other terms - $(3m)$, $(p⋅n)$, and $(p⋅m)$ - in this sum.
Constants are eliminated according to the $\mathcal{O}$ definition.