<s>[INST] How to algebraically prove $\binom{n+m}{2} = nm + \binom{n}{2} + \binom{m}{2}$? Need help trying to prove this problem algebraically. 
$$\binom{n+m}{2} = nm + \binom{n}{2} + \binom{m}{2}$$
The farthest I've got is simplifying the RHS to $$nm + \frac{n(n-1)}{2!} + \frac{m(m-1)}{2!}$$
but not sure what to do after that.
 [/INST] By definition, 
$$\binom{n}{k} = \frac{n!}{k!(n - k)!}$$
Hence,
\begin{align*}
nm + \binom{n}{2} + \binom{m}{2} & = nm + \frac{n!}{2!(n - 2)!} + \frac{m!}{2!(m - 2)!}\\
& = nm + \frac{n(n - 1)(n - 2)!}{2 \cdot 1 \cdot (n - 2)!} + \frac{m(m - 1)(m - 2)!}{2 \cdot 1 \cdot (m - 2)!}\\
& = nm + \frac{n(n - 1)}{2} + \frac{m(m - 1)}{2}\\
& = \frac{2nm + n(n - 1) + m(m - 1)}{2}\\
& = \frac{2nm + n^2 - n + m^2 - m}{2}\\
& = \frac{n^2 + 2nm + m^2 - n - m}{2}\\
& = \frac{(n + m)^2 - (n + m)}{2}\\
& = \frac{(n + m)(n + m - 1)}{2}\\
& = \frac{(n + m)(n + m - 1)(n + m - 2)!}{2(n + m - 2)!}\\
& = \frac{(n + m)!}{2!(n + m - 2)!}\\
& = \binom{n + m}{2}
\end{align*}
</s>