Use [Radon's theorem](https://en.wikipedia.org/wiki/Radon's_theorem) to show that homogeneous hyperplanes $w$ can shatter (i.e., assign all possible sign sequences via $x\mapsto\text{sign}(<w,x>)$ at most $d$ points. This is an upper bound on the [VC-dimension on hyperplanes](https://en.wikipedia.org/wiki/VC_dimension) (which turns out to be tight). Then use the [Sauer-Shelah lemma](https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma) to bound the number of *behaviors* that the hyperplanes can attain on $n$ points That accounts for the formula $\sum_{i=1}^d {n\choose i}$. As for pairs of hyperplanes, I'll use a very crude bound for VC-dimension of intersections of pairs of sets from a VC-class of dimension $d$, see Theorem 3.6 in [Kearns-Vazirani](https://mitpress.mit.edu/books/introduction-computational-learning-theory) or [this paper](http://www.cse.buffalo.edu/~hungngo/classes/2010/711/lectures/0081.pdf) by Baum and Haussler, to get that the VC-dimension of the collection of pairs of hyperplanes in $d$ dimensions is at most $20d$. You can then apply Sauer-Shelah to this new value of VC-dimension.