Rate of A: \(\frac{1}{A}\)

Rate of B: \(\frac{1}{B}\)

\(\frac{1}{A} + \frac{1}{B} = \frac{1}{8}\)

\(\frac{1}{A} = - \frac{1}{B} + \frac{1}{8}\)

\(\frac{12}{A} + \frac{6}{B} = 1\)

\(12(-\frac{1}{B} + \frac{1}{8})+ \frac{6}{B} = 1\)

\( \frac{6}{B} = \frac{3}{2}-1\)

\(B = 12\)

\(\frac{1}{A} + \frac{1}{12} = \frac{1}{8}\)

\(\frac{1}{A} = \frac{1}{24}\)

\(A = 24\)