I’m still waiting for the moment when I need this type of calculation in real life.
I do similar calculations all the time in real life. For example, I am designing a foundation for a tractor shed in my property. I have two types of steel reinforcing bar in the design, but not in equal numbers. I calculate the number of each and the total number.
And, when I want to divide the dollar values of different stock investments equally but the shares all have different prices, I do a very similar calculation.
Of course, if one can't do the first calculation at all, it may prevent acquiring investable assets, eliminating the need to do the second calculation...