The law of tangents is a statement about the relationship between the tangents of two angles of a triangle and the lengths of the opposing sides.
Let $a$, $b$, and $c$ be the lengths of the three sides of a triangle, and $\alpha$, $\beta$ and $\gamma$ be the angles opposite those three respective sides. The law of tangents states that
$$\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}=\frac{a-b}{a+b}\tag{1}$$
The law of tangent can be used in any case where two sides and the included angle, or two angles and a side, are known.
Although Viète gave us the modern version of the law of tangents, it was Fincke who stated the law of tangents for the first time and also demonstrated its application by solving a triangle when two sides and the included angle are given. An excellent overview of the history of the law of tangents together with several proofs are given by Wu - The Story of Mollweide and Some Trigonometric Identities.
Generalization. Let $a$, $b$, $c$ and $d$ be the sides of a cyclic convex quadrilateral. Let $\angle{DAB}=\alpha$ and $\angle{ABC}=\beta$, then the following identity holds
$$\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}=\frac{(a-c)(b-d)}{(a+c)(b+d)}\tag{2}$$
$$\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}=\frac{\sin\frac12(\alpha-\beta)\cos\frac12(\alpha+\beta)}{\cos\frac12(\alpha-\beta)\sin\frac12(\alpha+\beta)}=\frac{\sin{\alpha}-\sin{\beta}}{\sin{\alpha}+\sin{\beta}}$$
The area of a cyclic quadrilateral can be expressed as $\Delta=\frac12(ad+bc)\sin{\alpha}$ (see $(12)$ at Killing three birds with one stone) and similarly for the other angles. Then substituting, simplifying and factorizing we have
$$\begin{align*}\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}&=\frac{\frac{2\Delta}{ad+bc}-\frac{2\Delta}{ab+cd}}{\frac{2\Delta}{ad+bc}+\frac{2\Delta}{ab+cd}}=\frac{ab-ad+cd-bc}{ab+ad+cd+bc}=\frac{(a-c)(b-d)}{(a+c)(b+d)}\end{align*}$$
$\square$
The formula $(2)$ reduces to the law of tangent for a triangle when $c=0$.
A historical correction: Fincke was not the first to publish the law of tangents. It was actually Ibn Muadh who first described it in the 11th century. See the discussion at HSMSE
See also