TeX source:
\dfrac{a+\frac{a}{b}}{1+\frac{1}{b}} = \dfrac{\frac{ab+a}{b}}{\frac{b+1}{b}} = \frac{ab+a}{b} \cdot \frac{b}{b+1} = \frac{(ab+a)b}{b(b+1)} = \frac{a (b+1) b}{b (b+1)} = a