If you are allowed to use the Heron's formula, then you can do the following. Let $AB=c$, $BC=a$ and $AC=b$. Then the area of the triangle is $A=21a=24b=56c$. Express $a$, $b$ and $c$ though $A$ and substitute in the Heron's formula. You will get an equation in $A$, from where $A$ can be found. Then it is easy to find sides from altitudes.