Ratio of balls in a box A box contains some identical tennis balls. The ratio of the total volume of the tennis
balls to the volume of empty space surrounding them in the box is $1:k$, where $k$ is an
integer greater than one.
A prime number of balls is removed from the box. The ratio of the total volume of the
remaining tennis balls to the volume of empty space surrounding them in the box is 1:$k^2$.
Find the number of tennis balls that were originally in the box.
A few questions regarding this problem:
Does the shape of the box matter? I just let the volume of the box be a constant $V$. Also I noted that the ratio $\frac{1}{k^2} = \left( \frac{1}{k} \right)^2$. ie. New ratio is the old ratio squared. I also let the amount of balls in the box be $n$ and the amount of balls taken out be $p$ where $p$ is a prime, so the new amount of balls in the box is $n-p$.
This is about all I could do in this problem but I would like to be guided towards solving the problem (and I'm also interested in your thought processes and what ideas you initially think of so I can get a better idea of what to think of when doing problem solving) than just being given the solution.
Your help would be much appreciated.

$V$ is the volume of the box and $s$ is the volume of each ball. Then we can write:
$\frac{ns}{V-ns}=\frac{1}{k} \to \frac{ns}{V}=\frac{1}{k+1}$
$\frac{(n-p)s}{V-(n-p)s}=\frac{1}{k^2} \to \frac{(n-p)s}{V}=\frac{1}{k^2+1}$
$\frac{n}{n-p}=\frac{k^2+1}{k+1} \to 1+\frac{p}{n-p}=k+1-\frac{2k}{k+1}$
$\frac{p}{n-p}=\frac{k^2-k}{k+1}$
$\frac{p}{n}=\frac{k^2-k}{k^2+1}$
if $gcd(n,p)=1$ then $k(k-1)n=p(k^2+1)$ so $k=ap$ or $k=ap+1$.
if $k=ap$ then $n=\frac{(a^2p^2+1)}{a^2p-a}=p+\frac{pa+1}{a^2p-a}$ so $\frac{pa+1}{a^2p-a} \geq 1$ so $a+1 \geq a^2p-pa$ so either $a=1$ or $\frac{a+1}{a^2-a}\geq p$ that is impossible for $a>1$ so $a=1$ and $n=\frac{p^2+1}{p-1}=p+1\frac{2}{p-1}$ and it is only natural when $p = 2$ so $n=5$ and $k=2$. or $p=3,n=5,k=3$
if $k=ap+1$ then $n=\frac{a^2p^2+2ap+2}{a^2 p+a}=p+\frac{ap+2}{a^2p+a}$ so $ap+2 \geq a^2p+a$ which is impossible for $a>1$, but for $a=1$,$p+\frac{p+2}{p+1}=p+1+\frac{1}{p+1}$ will not be a natural number so we should dismiss this case. 
if $gcd(n,p)=p$ then $\frac{1}{t}=\frac{k^2-k}{k^2+1} \to t=\frac{k^2+1}{k^2-k}$ that cannot be a natural number for $k>1$, be cause it is strictly decreasing for $k>1$ and for $k=3$ it is less than 2 and for $t=2$ it is not integer.
Note that in the second case $n$ cannot be equal to $p$ because for no natural $k$, $k^2+1=k^2-k$. 
So the final result is: $n=5,k=2,p=2$ or $n=5,k=3,p=3$
