You bias us toward the algebraic solution by saying that the problem reduces to two equations. The stacking solution is more elegant, I think, because it introduces a new unit of measurement, the table-height. That has more of an aha! feel to it. But maybe that's just a matter of taste.