(An observation, not an answer.) If A has pairwise distinct diagonal elements then any matrix $X$ commuting with $A$ is necessarily upper triangular. It is easy to see this once you compute the lower part of $D=[A,X]$, because $$D_{ij}=(A_{ii}-A_{jj})X_{ij}+\sum_{k>i} A_{ik} X_{kj}-\sum_{k<j} A_{kj} X_{ik}.$$ For example, $D_{n1}=(A_{nn}-A_{11})X_{n1}$. Thus $X_{n1}=0$ and then $X_{ij}=0$ by induction on $n-(i-j)$, which only breaks down when $i-j=0$. As $B$ commutes with any matrix commuting with $A$, it is a polynomial of $A$.
What we need to prove is $$C(C({\mathbb F}(A))\cap T_n({\mathbb F}))\cap T_n({\mathbb F})=C(C({\mathbb F}(A))),$$ where $C(R)$ denotes a centralizer of a subalgebra $R\subset M_n({\mathbb F})$. In the above case it is trivial because $C({\mathbb F}(A))\subset T_n({\mathbb F})$.