In a right triangle, $\tan A = \frac{BC}{AC}$ and $\tan B = \frac{AC}{BC}$.
Then: $\tan A + \tan B = \frac{BC}{AC} + \frac{AC}{BC} = \frac{BC^2 + AC^2}{BC \cdot AC}$.
Using the Pythagorean theorem, $BC^2 + AC^2 = AB^2 = c^2$.
Hence: $\tan A + \tan B = \frac{c^2}{ab}$.