Fix an integer $h$ and let $ S_h(x) = \sum_{t=0}^{h-1}\;\left(\frac{x+t}{p}\right) $ Where the $(\cdot/p)$ representes the Legendre symbol. We want to prove that \sum_{x=0}^{p-1}S_h(x)^{2r} < (2r)^r p h^r + 4rh^{2r}\sqrt{p} Developping the powers in the left and inverting summations we obtain the sum $\sum_{m_1\dots m_{2r} = 1}^h \sum_{x=0}^{p-1} \left( \frac{(x+m_1)(x+m_2)\dots(x+m_r)}{p} \right ) $
The outer sum is over the $h^{2r}$ tuples $(m_1,\dots,m_{2r})$ where each $m_i$ varies independently from $1$ to $h$. In order to bound above this sum we divide the outer sum in two sets of tuples, in the first set we pick first the tuples $(m_1,\dots,m_{2r})$ for which the polynomial $(x-m_1)(x-m_2) \dots (x-m_{2r})$ is a square, in this case we have $ \sum_{x=0}^{p-1} \left( \frac{(x+m_1)(x+m_2)\dots(x+m_{2r})\,}{p} \right ) \le p $ because the value of the polynomial is a square for every $x$ and in consequence the value of the Legendre symbol inside the sum is always 0 or 1.
Now if the polynomial is a square that means that we can group the $m_i$'s of a tuple in $r$ pairs with the same value in each pair. So the number of tuples which lead to a square polynomial can be bounded above by the number of partitions of the $2r$ positions in $r$ pairs, times the number of independent $r$-tuples of values from 1 to $h$.
The number of partitions of $1,2,\dots, 2r$ in $r$ pairs is simply $ (2r-1)(2r-3)\dots 5\cdot 3\cdot 1$ just observe that the first index can be paired with any of the other $2r-1$ positions, and now the first free index can be paired with any of the $2r-3$ free positions, and so on. But (2r-1)(2r-3)\dots 5\cdot 3\cdot 1 < (2r)^r as there are $r$ factors all smaller than $2r$.
Now to each pair we can assign any integer from 1 to $h$, as there are $r$ pairs we have $h^r$ possible asignations. So finally the number of tuples $m_1,\dots,m_{2r}$ wich lead to a square polynomial $(x+m_1)(x+m_2)\dots(x+m_{2r})$ is bounded by $(2r)^rh^r$
Note that the estimation of the number of tuples leading to a square polynomial is a little rough, for example with $r=2$ and $h=3$ there are only 21 tuples in this group (starting with (1,1,1,1),(1,1,2,2),(1,1,3,3),(1,2,1,2),(1,2,2,1),(1,3,1,3),(1,3,3,1),$\dots$ ), but $(2r)^rh^r= 1296$.
In the second group we pick the tuples $(m_1,\dots, m_{2r})$ for wich $(x+m_1)\dots(x+m_{2r}$ is not a square. This means that we can write them as a product $g(x)^2F(x)$ where $F(x)$ is squarefree. For the Legendre symbol we have then $ \left(g(x)^2F(x) \over p \right ) = \left( F(x) \over p \right) $ except possibly when $g(x) = 0$, as $g(x)$ has at most degree $r$ this means that the sums $ \sum_{x=1}^p \left(g(x)^2F(x)\over p\right) \quad\text{and}\quad \sum_{x=1}^p \left(F(x)\over p\right) $ differ at most by $r$. For the right sum we can use now the bound (André Weil) $\left \lvert \sum_{x=0}^{p-1} \left( F(x) \over p \right ) \right \rvert \leq (\deg F -1) \sqrt{p} $ and so \left \lvert \sum_{x=0}^{p-1} \left( g(x)^2F(x) \over p \right ) \right \rvert \leq 2r + 2r\sqrt{p}< 4r\sqrt{p}
As the number of tuples in this case is at most $h^{2r}$ (the total number of tuples) we finally have the toal upper bound of $h^{2r}\sqrt{p}$ to the sum limited to this second set of tuples giving the lemma.
EDIT 2: I have rewritten the proof to make it more clear.