If $\alpha(x)$ is not $c$ all the time, then $\alpha(x) - c$ is not zero all the time. An easy way to detect this is to square it and integrate. Conveniently, by the fundamental theorem of calculus, the given $h(x)$ satisfies $h'(x) = \alpha(x)-c$. So $\int_a^b (\alpha(x) -c)h'(x) \,\mathrm{d}x$ is squaring it and integrating (which is what the last display in your imgur link says).
The integral is also like a dot product. One way to get a large dot product from a nonzero vector is to dot the vector with itself. This choice of $h$ produces an integral that is the dot product of $\alpha(x) -c$ with itself. So if $\alpha(x) -c$ is not "the zero vector", we get a "large" (positive) dot product. Since we can distribute $h'(x)$ and actually do the integrals ("on the one hand") getting zero, we end up showing that the dot product is zero, so the vector is zero, so $\alpha(x) = c$.