Let 5 millimeter of compound A and 4 millimeter of compound B makes 1 unit.
Thus, we have:
729 / (5 + 4) = 729 / 9 = 81 units
In each unit, there is 5 millimeter of compound A.
Since there are 81 units, we have:
81 * 5 = 405 millimeter of compound A.