If G is a simple graph containing exactly two components H and H', show that $$|E(G)| \le \frac{(|V(G)|-1)(|V(G)|-2)}{2}$$
Here is my (incomplete) proof that I need help with:
1. Since H and H' are components of G, $E(H) \cap E(H') = \emptyset$ and $V(H) \cap V(H') = \emptyset$.
2. Therefore $|E(G)| = |E(H)| + |E(H')|$ and $|V(G)| = |V(H)| + |V(H')|$.
3. Suppose H and H' are complete subgraphs. Then $|E(H)| = C(|V(H)|, 2) = \frac{(|V(H)|)(|V(H)|-1)}{2}$.
4. Similarly, $|E(H')| = \frac{(|V(H')|)(|V(H')|-1)}{2}$.
5. Let $|V(H)| = a$ and $|V(H')| = b$. Then, $|E(H)| = \frac{a(a-1)}{2}$ and $|E(H')| = \frac{b(b-1)}{2}$ and $|V(G)| = a + b$.
6. $Max |E(G)| = |E(H)| + |E(H')| = \frac{a(a-1) + b(b-1)}{2}$.
7. Therefore, $|E(G)| \le \frac{a(a-1) + b(b-1)}{2}$.
8. ...
How do I show that $\frac{a(a-1) + b(b-1)}{2} \le \frac{(a+b-1)(a+b-2)}{2}$ for all $a, b \ge 1$? If I can do that, I can show that $|E(G)| \le \frac{(a+b-1)(a+b-2)}{2}$ and thus $|E(G)| \le \frac{(|V(G)|-1)(|V(G)|-2)}{2}$.
EDIT: Is my approach correct? I am also open to any alternative methods of proof for this question.
The expression $\frac{a(a-1) + b(b-1)}{2} \le \frac{(a+b-1)(a+b-2)}{2}$ on expanding and simplifying a bit changes to $a + b \le ab + 1$.
$a + b \le ab + 1 \iff 0 \le ab-a-b+1 \iff 0 \le (a-1)(b-1)$.
As $a$ and $b$ both are $\ge$ 1 hence, the inequality is true.