How to find the Jordan canonical form of the matrix $A$ as a function of the complex parameter $q$:
$$A=\begin{bmatrix} 0 & 3 & q \\ 1 & 0 & 0 \\ 0 & 1 & 0\end{bmatrix}$$ I can find the characteristic equation where $L$ is an eigenvalue $L^3-3L-q=0$ What should I do next? Looking for roots according to the Cardano formula? Or is there another option?
Two choices, really. For most values of $q$ the characteristic polynomial $L^3 - 3 L - q$ has three distinct roots, so the Jordan form is just diagonal. Not that there is any real chance of writing that all out.
The other choice is when there are repeat eigenvalues. The polynomials over a field make a Euclidean ring, and we can try to find the GCD of the polynomial and its (formal) derivative, that being $3L^2 - 3 .$ This factors as $3(L+1)(L-1).$ The possible roots are $1$ and $-1.$
The two special cases that might have non-diagonal Jordan form are then $q=2,$ which has one Jordan form, and then $q=-2,$ which has a different Jordan form. In both cases you can find all the eigenvalues without difficulty; finish those.