Let
$$\mathrm M := \begin{bmatrix} 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ a & b & c & d\end{bmatrix}$$
which is the companion matrix to the following (characteristic) polynomial
$$p (s) := s^4 - d s^3 - c s^2 - b s - a$$
Using the Cayley-Hamilton theorem,
$$\mathrm M^4 - d \,\mathrm M^3 - c \,\mathrm M^2 - b\,\mathrm M - a \,\mathrm I_4 = \mathrm O_4$$
Multiplying both sides by $\mathrm M^{-1}$, we obtain
$$\mathrm M^3 - d \,\mathrm M^2 - c \,\mathrm M - b\,\mathrm I_4 - a \mathrm M^{-1} = \mathrm O_4$$
Assuming that $a \neq 0$,
$$\mathrm M^{-1} = \frac{1}{a} \, \mathrm M^3 - \frac{d}{a} \,\mathrm M^2 - \frac{c}{a} \,\mathrm M - \frac{b}{a}\,\mathrm I_4$$
Using SymPy:
>>> a, b, c, d = symbols('a b c d')
>>> M = Matrix([[0,1,0,0],
[0,0,1,0],
[0,0,0,1],
[a,b,c,d]])
>>> simplify((1/a)*M**3 - (d/a)*M**2 - (c/a)*M - (b/a)*eye(4))
Matrix([[-b/a, -c/a, -d/a, 1/a],
[ 1, 0, 0, 0],
[ 0, 1, 0, 0],
[ 0, 0, 1, 0]])