came across this problem

$\displaystyle x^3+px=q$

sub in $\displaystyle x=u+v$

then it says they got this

$\displaystyle u^3+v^3+(3uv+p)(u+v) = q$ how did it become this? $\displaystyle x^3 \Rightarrow u^3+v^3$ this makes sense but the $\displaystyle (3uv+p)(u+v)$ doesn't. why isn't it just $\displaystyle p(u+v)$