How to solve 7 blue boxes I recently came across this problem in a job assessment test. I can't go back and answer the question now, but not knowing the answer is bothering me. Any thoughts on the solution and the means of solving would be excellent. 
Mary has three different colored boxes, blue, red, and green. She places 7 of these blue boxes on her desk. With these 7, she fills some and leaves some empty. In the boxes that she fills, she places 5 red boxes. In these red boxes, she fills some and leaves some empty. In the boxes she fills, she places 5 green boxes. Mary now has 87 empty boxes on her desk. How many total boxes does Mary have on her desk?
In regards to the answer, it was multiple choice. Three of the answers were below 87, so I discounted those as the answer was asking for the total of all the boxes, not just the remainder of the boxes beside those which were empty. The two answer I was left with were 107 and 207. 
I'm unsure of what type of problem this exactly is, so I was unable to solve it. I went ahead and guessed 107 as my answer, It didn't seem like enough boxes were being filled to add up another 100, but I could certainly be wrong. I'll facepalm I'm sure if an answer is derived, but right now I'm just boggled. 
Look forward to any thoughts,
Rodge
 A: Let $x$ denote the number of blue boxes that get filled and $y$ the number of red boxes that get filled. Then there are $5x$ red boxes and $5y$ green boxes. Hence,
The total number of boxes is
$$7+5x+5y=7+5\cdot(x+y)$$ and the number of empty boxes is $$\underbrace{7-x}_{\text{empty blue boxes}}+\underbrace{5x-y}_{\text{empty red boxes}}+\underbrace{5y}_{\text{empty green boxes}}=7+4\cdot(x+y)=87.$$
Hence, $x+y=20$ and thus there will be a total of $7+5\cdot 20=107$ boxes. So your guess was correct - congratulations!
A: Let $r$, $b$, and $g$, be the nubmers of red, blue, and green boxes respectively.
There are seven blue boxes.  A blue box is either empty or filled.  If it is filled, it is filled with $5$ red boxes.  Let $b_e$ be the number of empty blue boxes and $b_f$ be the number of filled blue boxes.  We know \begin{align*}
b &= 7  \\
b &= b_e + b_f  \\
r &= 5 b_f  
\end{align*}
A red box is either empty or filled.  If it is filled, it is filled with $5$ green boxes.  Let $r_e$ be the number of empty red boxes and $r_f$ be the number of filled red boxes.  We know \begin{align*}
r &= r_e + r_f \\
g &= 5 r_f
\end{align*}
All green boxes are empty, so there are $g$ empty green boxes and 
$$  b_e + r_e + g = 87  \text{.}  $$
We want \begin{align*}
b+r+g &= b_e + b_f + r_e + r_f + g  \\
    &= 87 + b_f + r_f  \text{.}
\end{align*}
We know $b_f \leq 7$ and so $r_f \leq 35$, so the maximum value of $b+r+g$ is $87 + 7 + 35 = 129$.  Of the two options, only $107$ is not too big.
(One can actually go through and solve the linear system of five equations in five unknowns to find that $107$ is the only possible total number of boxes.)
A: It is easy to solve without algebra.  She starts out with seven empty boxes on her desk.  Every "operation" she does adds five boxes to the desk and a total of four extra empty boxes (since one box stops being empty but five new empty boxes).  Since she winds up with $87$ empty boxes, there must be $\frac{87-7}{4}=20$ operations in all, so that gives a total of $7+5\cdot20-107$ boxes.
