Im trying to show that $f(x)= x^5 + 2x^4 + 3x^2 -x + 887 =0 $ mod $31^k, k\geq 2$ such that $x\equiv 2$ mod 31 has many solutions.
For now I was trying to play around with $k=2$. I know $f(2) \equiv 0 $ mod $31$ but to apply Hensel's lemma $f'(2)$ cant be $0$ mod $31$ which unfortunately is the case here. I found a stronger version of the lemma here that states
But im having a hard time using this version. If i set k=2, d=0 then $f'(2) \equiv 0$ mod 1 but then$f'(2) \equiv 0$ mod 31. If i try to set $d=1$ then i cant set $k=2$.

You can't apply the version of Hensel's lemma that you quote because in your case $k$ would be $2$ and $d$ $1$, so the hypothesis $d<\frac{k}{2}$ isn't satisfied. You can slog your way through it and see what you get, so solve for $k$ in $$ \begin{align} f(31k+2)&\equiv 0 \pmod {31^3} \\ 29791k^5 + 11532k^4 + 1736k^3 + 131k^2 + 5k + 1&\equiv 0 \pmod{31}\\ k&\equiv 21,27 \pmod{31} \end{align} $$ And repeat for $31^2k+21\cdot31+2$ and $31^2k+27\cdot31+2$ $$ \begin{align} f(31^2k+21\cdot31+2)&\equiv 0 \pmod {31^4} \\ 27512614111k^5 + 93531436317k^4 + 127187133374k^3 + 86476598111k^2 + 29398410998k + 3997688476&\equiv 0 \pmod{31}\\ k&\equiv 5 \pmod{31} \end{align} $$ and $$ \begin{align} f(31^2k+27\cdot31+2)&\equiv 0 \pmod {31^4} \\ 27512614111k^5 + 120156546747k^4 + 209905062302k^3 + 183344671595k^2 + 80072535290k + 13988101012&\equiv 0 \pmod{31}\\ k&\equiv 10 \pmod{31} \end{align} $$
We are getting two solutions congruent to $2 \pmod{31}$ at each step, but that's all pretty difficult without a computer algebra package like GP/PARI. So, since GP/PARI is already up and running we could look for another approach.
What we'd like to find is a different polynomial to which we could apply Hensel's lemma. Let's call $\alpha$ a root of your polynomial and find an integral basis for $\Bbb{Q}[\alpha]$. The element
$$ \beta=\frac{\alpha^4+4\alpha^3+8\alpha^2+19\alpha+6}{31} $$
looks like a good candidate. The minimum polynomial for $\beta$ is $x^5 + 121x^3 - 1363x^2 + 8438x - 19868$ and $$ \alpha = \frac{-\beta^4+\beta^3-122\beta^2+1485\beta-8001}{31^2} $$ Earlier we slogged our way into solutions $653, 839 \equiv{31^2}$ for $\alpha$. Plugging those in we see that we would need to find solutions to $g(x)=x^5 + 121x^3 - 1363x^2 + 8438x - 19868$ congruent to $7$ or $27$ $\pmod{31}$. A quick check shows that $7\pmod{31}$ and $27\pmod{31}$ are indeed roots of $g(x)$, but now $g'(x)$ is non-zero at the roots so Hensel's lemma can be applied.
Finally since we are actually working $\mod{31^k}$ and not over a number field extension we really should get rid of the $31$ in the denominators and say for a root $\alpha\pmod {31^k}$
$$ 31\beta\equiv\alpha^4+4\alpha^3+8\alpha^2+19\alpha+6 \pmod{31^{k-1}} $$
and similarly for a root $\beta$ of $g(x)\pmod {31^k}$
$$ 31^2\alpha = -\beta^4+\beta^3-122\beta^2+1485\beta-8001\pmod{31^{k-2}} $$