Let $R$ a commutative ring and let $f(x) \in R[x]$.
(i) Prove that if $(x-a)^2|f(x)$, then $(x-a)|f'(x)$.
(ii)Prove that if $(x-a)|f(x)$ and $(x-a)|f'(x)$, then $(x-a)^2|f(x)$.
Any help in order to prove the last statements? I have been trying to prove these straight forward but I cannot see how to attack this exercises, thanks.