well, let's simply divide the total of 24 by (2 + 1 + 5) and then distribute accordingly to each ratio.
[tex]2 ~~ : ~~ 1 ~~: ~~ 5\implies 2\cdot \cfrac{24}{2+1+5}~~ : ~~ 1\cdot \cfrac{24}{2+1+5} ~~: ~~ 5\cdot \cfrac{24}{2+1+5} \\\\\\ 2 \cdot \cfrac{24}{8}~~ : ~~ 1 \cdot \cfrac{24}{8}~~: ~~ 5\cdot \cfrac{24}{8}\implies 2(3)~~ : ~~ 1(3) ~~: ~~ 5(3)\implies 6:\stackrel{\stackrel{shortest}{\downarrow }}{3}:15[/tex]