AGM ineqaulity

prove that $\displaystyle x(c-x)$ is maximized when $\displaystyle x=c/2 $

I know how to do this using derivatives but i don't really understand where to start this using the AGM inequality my prof isn't much help either this is what my text book says but it don't really get how to apply it