The sum of the lengths of the twelve edges of a rectangular box is $140$, and 
the distance from one corner of the box to the farthest corner is $21$. The total 
[surface area](https://artofproblemsolving.com/wiki/index.php/Surface_area) of the box is 
$\text{(A)}\ 776\qquad\text{(B)}\ 784\qquad\text{(C)}\ 798\qquad\text{(D)}\ 800\qquad\text{(E)}\ 812$
Let $x, y$, and $z$ be the unique lengths of the edges of the box.  Each box has $4$ edges of each length, so:
\[4x + 4y + 4z = 140 \ \Longrightarrow \ x + y + z = 35.\]
The spacial diagonal (longest distance) is given by $\sqrt{x^2 + y^2 + z^2}$.  Thus, we have $\sqrt{x^2 + y^2 + z^2} = 21$, so $x^2 + y^2 + z^2 = 21^2$.
Our target expression is the surface area of the box:
\[S = 2xy + 2xz + 2yz.\]
Since $S$ is a [symmetric polynomial](https://artofproblemsolving.com/wiki/index.php/Elementary_symmetric_sum) of degree $2$, we try squaring the first equation to get:
\[35^2 = (x + y + z)^2 = x^2 + y^2 + z^2 + 2xy +2yz + 2xz = 35^2.\]
Substituting in our long diagonal and surface area expressions, we get: $21^2 + S = 35^2$, so $S = (35 + 21)(35 - 21) = 56\cdot 14 = 784$, which is option $\boxed{(\text{B})}$.