The complex numbers $z_1, z_2, z_3$ are given by
\begin{align}z_1&=-39+21i\\ z_2&=-3+pi\\ z_3&=q+3i\end{align}
Given that $z_1=z_2z_3$, find the value of $p$ and $q$
My Attempt
\begin{align}-39+21i&=(-3+pi)(q+3i)\\ &=-3q-9i+qpi+3pi^2\end{align}
How do I proceed from here, can I move things around the "="?
You have $$-39+21i=-3q-9i+qpi+3pi^2$$
We can rearrange the right hand side as follows, remembering that $i=\sqrt{-1}$ so $i^2=-1$:
\begin{align}-3q-9i+qpi+3pi^2&=-3q-9i+qpi+3p(-1)\\ &=-3q-9i+qpi-3p\\ &=(-3q-3p)+(-9+qp)i\end{align}
Now we can use the fact that two complex numbers are equal if their real and imaginary parts are equal, that is to say that \begin{align}-3q-3p&=-39\tag{real}\\ -9+qp&=21\tag{imaginary}\end{align}
Can you continue from here?