Answer
See the detailed answer below.
Work Step by Step
$$\color{blue}{\bf [a]}$$
Two charges have a net charge of 40 nC, if you know that the potential energy between them is 90$\;\mu\rm J$ when they are 3 cm apart, what is the magnitude of the two charges?
$$\color{blue}{\bf [b]}$$
Solving the first given formula for $q_1$;
$$q_1=\dfrac{3\times 10^{-16}}{q_2}$$
Plug into the second given formula,
$$\dfrac{3\times 10^{-16}}{q_2}+q_2=40\times 10^{-9}$$
Hence,
$q_2=1\times 10^{-8}\;\rm C$ or $q_2=3\times 10^{-8}\;\rm C$
Therefore, the two charges are $\color{red}{\bf10}\;\rm nC$ and $\color{red}{\bf30}\;\rm nC$