B's rate is 1/15 of the work per day. In 10 days, B completes 10 * (1/15) = 2/3 of the work. The remaining work is 1 - 2/3 = 1/3. A's rate is 1/18 of the work per day. Time for A to finish = Remaining work / A's rate = (1/3) / (1/18) = 6 days.