Assuming that we're talking about lines in the 2D space:

$\displaystyle

\tan \left( \theta \right) = \frac{{m_2 - m_1 }}

{{1 + m_1 m_2 }}

$

now using the fact that the slope of the line equals the tangent of the angle between the line and the positive x axis:

$\displaystyle

\tan \left( \theta \right) = \frac{{\tan \left( {\theta _2 } \right) - \tan \left( {\theta _1 } \right)}}

{{1 + \tan \left( {\theta _1 } \right)\tan \left( {\theta _1 } \right)}}$

using the following well known trigonometric identity:

$\displaystyle

\tan \left( {\theta _2 \pm \theta _1 } \right) = \frac{{\tan \left( {\theta _2 } \right) \pm \tan \left( {\theta _1 } \right)}}

{{1 \mp \tan \left( {\theta _1 } \right)\tan \left( {\theta _1 } \right)}}$

we get:

$\displaystyle

\tan \left( \theta \right) = \tan \left( {\theta _2 - \theta _1 } \right)$

now let's look at the following diagram:

thus:

$\displaystyle

\begin{gathered}

\theta _1 + 180 - \theta _2 + \theta = 180 \hfill \\

\theta = \theta _2 - \theta _1 \hfill \\

\end{gathered}

$

combined with the previous identity this proves the equality.