Why do we have to consider two balls of opposite charge? I have a question about the solution of the following problem:

Two metal balls of same radius $a$ are located inside a homogeneous poorly-conducting medium of resistivity $\rho$. Find the resistance  of the medium between the balls provided the separation between them is much greater than the radius of the ball.

The solution I've been shown starts by putting equal and opposite charges on the two conducting spheres, and then working out the implications from there.
Question: Why do we have to consider the balls as having opposite charges? Why it is necessary? Can we solve it without assuming opposite charges?
 A: I'm assuming that the conducting medium is taken to fill all of space (and to have negligible electric susceptibility).  The problem with unbalanced charges in this case is that it would result in a net flow of current out to infinity.  To see this, note that the electric field of any charge configuration can be written in a power series in $1/r$ as
$$
\vec{E} = \frac{1}{4 \pi \epsilon_0} \left[ \frac{Q_\text{tot}}{r^2} \hat{r} + \frac{1}{r^3} \left( 3 \vec{p} \cdot \hat{r} - \vec{p} \right) + \dots \right],
$$
where $Q_\text{tot}$ is the total charge of the configuration, and $\vec{p}$ is its dipole moment.  (The higher-order terms correspond to the fields of the quadrupole, octupole, etc.) If all of space is filled with an Ohmic medium, then the resulting current density in space will be given by $\vec{J} = \vec{E}/\rho$, and the current flowing through a large sphere of radius $R$ will be
\begin{multline}
I_R = \oint \vec{J} \cdot d \vec{a} = \frac{1}{4 \pi \epsilon_0 \rho} \iint \left[ \frac{Q_\text{tot}}{R^2} \hat{r} + \frac{1}{R^3} \left( 3 \vec{p} \cdot \hat{r} - \vec{p} \right) + \dots \right] \cdot (R^2 \, d \Omega \hat{r}) \\ = \frac{1}{4 \pi \epsilon_0 \rho} \iint \left[ Q_\text{tot} + \frac{2}{R}  \vec{p} \cdot \hat{r}  + \dots \right] \, d \Omega 
\end{multline}
In the limit as $R \to \infty$, every term except the first one will vanish.  But having a net charge on the charge configuration will result in a finite "leakage" of charge out to infinity, with a magnitude of $I_\infty = Q/\epsilon_0 \rho$.
So the short answer of "why do we need to assume equal & opposite charge in this problem" is that we're interested in the current flow between the spheres, because this is what determines the resistance measured between them.  If we require that there is no net charge on the spheres, then we get no net current outflow from the spheres;  in particular, this means that "current in" to one of the spheres is the same as "current out" of the other, and having these two numbers be equal to each other is implicit in any reasonable definition of resistance.
A: To compute the resistance, we need to know the current between the balls when they have some given voltage. But if we gave the two balls the exact same charge, then the voltage difference and current would both be zero, by symmetry, so that doesn't help.
Now suppose the balls have charge $q_1$ and $q_2$. Since electromagnetism is linear, we can add the same charge $-(q_1+q_2)/2$ to both balls without affecting the current or voltage. Then the balls have equal and opposite charges.
In short, it's not a requirement, but any deviation from having equal and opposite charges adds nothing to the problem. We can always make the charges exactly equal and opposite without changing the situation, and we do so because the symmetry makes the math a little easier.
