How to prove that r is a double root if and only if it is a root of a polynomial and of its derivative.

Hint $\ $ Wlog, by a shift, assume the root is $\rm\: r = 0.$

Notice $\rm\ \ x^2\: |\ f(x)$

$\rm\ \iff\ x\ |\ f(x)\ $ and $\rm\ x\ \bigg|\ \dfrac{f(x)}{x}$

$\rm\ \iff\ f(0) = 0\ $ and $\rm\ x\ \bigg|\ \dfrac{f(x)-f(0)}x\iff \dfrac{f(x)-f(0)}x\bigg|_{\:x\:=\:0} =\: 0$

$\rm\ \iff\ f(0) = 0\ $ and $\rm\ f'(0) = 0$

Remark $\ $ It's often overlooked that many divisibility properties of numbers are specializations of this double-root criterion for (polynomial) functions, e.g. see my answer here., or below from here.

Hint: a conceptual way: we seek $\,\color{#c00}{47^2\mid f(47)}\,$ for $\,f(x) = (x\!+\!5)^{n+1} + ((n\!-\!1)x\!-\!5)(2x\!+\!5)^n$

But $\,f(0)=0=f'(0)\,$ so by the double root test (or first two terms of the Binomial Theorem), it follows that $\,x=0\,$ is a double root so $\,f(x) = x^2 g(x)\,$ for $g$ a polynomial with integer coef's. Evaluating at $\,x=47\,$ yields $\,\color{#c00}{f(47)}= 47^2 g(47).\ $ QED


Hint: (a slightly different approach).

Suppose that $f(x)$ has $r$ as a root $m$ times ($m\geq 1$). Then $f(x)=(x-r)^m g(x)$ for some polynomial $g(x)$ with $g(r)\not=0$. What is $f'(x)$? What has to be true about $m$ if $f'(r)=0$?