Since, we have to compare profit of two people; there is no need to take actual values of profit and investments. We can use convenient values as used in solution below.
Since money invested by three is 60000, 96000 and 144000 respectively, we will take their investment as 5, 8 and 12 respectively (ratio)
Investment ratio X : Y : Z = 5 × 12 : 8 × 8 : 12 × 4 = 60 : 64 : 48 or 15 : 16 : 12
Let total profit be, 15 + 16 + 12 = 43
Z's share = 15% of 43 + (
) of 85% of 43 = 6.45 + 10.2 = 16.65
X's share = (
) of 85% of 43 = 12.75
Hence, Quantity A < Quantity B