let's divide the whole by the sum of its ratios, namely let's 160 ÷ (8+12), and then distribute accordingly.
[tex]\bf \textit{160 at 8:12 ratio}\qquad \qquad \cfrac{8\cdot \frac{160}{8+12}}{12\cdot \frac{160}{8+12}}\implies \cfrac{8(8)}{12(8)}\implies \cfrac{64}{96}[/tex]