Note $$ \mathbb{F}(A) := \left\{ f(A) \mid f \in \mathbb{F}[x] \right\}, \qquad \mathcal{C}(A) := \left\{ B \mid AB = BA \right\}$$ I know that there's a theorem claiming that if the minimal polynomial of $A$ equals the characteristic polynomial of $A$, then $\mathbb{F}(A)=\mathcal{C}(A)$.
Assume $A\in M_3\{\mathbb{R}\}$. If $\deg(m_A(\lambda))=3$ then $\mathcal{C}(A)=\mathbb{F}(A)$. If $\deg(m_A(\lambda))=1$,then by the theory of $\lambda-\text{matrix}$, we know $A$ is similar to $c I_3$ , hence $\mathcal{C}(A) = M_3\{\mathbb{R}\}$. How to find $\mathcal{C}(A)$ when $\deg(m_A(\lambda))=2$, where $m_A(\lambda)$is the minimal polynomial of $A$?
You are working in $M_3(\mathbb{R})$, with a matrix $A$ such that $m_A(X)$ has degree $2$. Since the characteristic polynomial $c_A$ has no roots which are not roots of $m_A$, we must have that $m_A$ is a product of two real factors $m_A(X)=(X-\lambda)(X-\mu)$ or $(X-\lambda)^2$.
Hence $A$ is similar to $\begin{pmatrix} \lambda & 0 &0\\0 &\lambda &0\\0&0&\mu\end{pmatrix}$ or to $\begin{pmatrix} \lambda & 1 &0\\0 &\lambda &0\\0&0&\lambda\end{pmatrix}$. It is now easy to compute the centraliser.