Let $A = (a_{i,j})_{n\times n}$ and $B = (b_{i,j})_{n\times n}$
$(AB) = (c_{i,j})_{n\times n}$, where $c_{i,j} = \sum_{k=1}^n a_{i,k} b_{k,j}$, so
$(AB)^T = (c_{j,i})$, where $c_{j,i} = \sum_{k=1}^n a_{j,k}b_{k,i} $, and $B^T = b_{j,i}$ and $A^T = a_{j,i}$, so
$B^T A^T = d_{j,i}$ where $d_{j,i} = \sum_{k=1}^n b_{j,k} a_{k,i}$, but this mean that $(AB)^T \not = (B^T A^T)$, so where is the problem in this derivation ?
Edit: To be clear, lets be more precise; Let $A = (a_{x,y})_{p\times n}$ and $B = (b_{z,t})_{n\times q}$
So, $A^T_{n\times p} = (a_{y,x})$ and $B^T_{q\times n} = (b_{t,z})$, which implies
$$(B^T A^T)_{i,j}^{q \times p} = \sum_{k=1}^n b_{i,k} a_{k,j},$$ and
$(AB)_{c,d}^{p\times q} = \sum_{k=1}^n a_{c,k} b_{k,d}$, which implies $$((AB)^T)_{d,c}^{q\times p} = \sum_{k=1}^n = a_{d,k} b_{k,c}.$$ Since $i,d \in \{1,...,q\}$ and $j,c \in \{1,...,p\}$, $$((AB)^T)_{d,c}^{q\times p} = \sum_{k=1}^n = a_{d,k} b_{k,c} = = \sum_{k=1}^n = a_{i,k} b_{k,j},$$ which again concludes that $(AB)^T \not = (B^T A^T)$.
You seem to know that $(i,j)$-entry of $B^T$ is $b_{j,i}$, that is probably why you are writing $B^T = (b_{j,i})$. The issue is, this notation is confusing as it is not telling you which index denotes the row and which denotes the column. I guess this is where you get confused.
To make things clear, let us use some unconventional notation: A matrix $A$ whose $(i,j)$-entry is $a_{i,j}$ is denoted by the following function notation
$$A = [(i,j)\mapsto a_{i,j}].$$
So if you know that $A$ is given by $A = [\text{some function of the pair }(i, j)]$, then you simply evaluate that function at $(i,j)$ to retrieve its $(i,j)$-entry. This seemingly stupid tautology is in fact helping because the transpose of $A$ is written by $A^T = [(i,j) \mapsto a_{j,i}]$, where the role of $i$ and $j$ are now explicit. Then
\begin{align*} \text{$(i,j)$-entry of $B^TA^T$} &= \sum_{k=1}^{n} (\text{$(i,k)$-entry of $B^T$})\cdot(\text{$(k,j)$-entry of $A^T$}) \\ &= \sum_{k=1}^{n} (\text{value of $(x, y)\mapsto b_{y,x}$ at $(x,y) = (i,k)$}) \\ &\hspace{3em} \cdot(\text{value of $(z, t)\mapsto a_{t,z}$ at $(z,t) = (k,j)$}) \\ &= \sum_{k=1}^{n} b_{k,i} a_{j,k} = \sum_{k=1}^{n} a_{j,k}b_{k,i} = \text{$(j,i)$-entry of $AB$}. \end{align*}
If it is still not convincing, it never hurts to consider a concrete example. Consider
$$ A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \end{pmatrix}, \qquad B = \begin{pmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \\ b_{31} & b_{32} \end{pmatrix} $$
Then $[AB]_{11} = a_{11}b_{11} + a_{12}b_{21} + a_{13}b_{31}$ as expected. Now consider their transpose:
$$ A^{T} = \begin{pmatrix} a_{11} & a_{21} \\ a_{12} & a_{22} \\ a_{13} & a_{23} \end{pmatrix}, \qquad B^{T} = \begin{pmatrix} b_{11} & b_{21} & b_{31} \\ b_{12} & b_{22} & b_{32} \end{pmatrix}. $$
Now the $(1,2)$-entry of the product $B^T A^T$ is given by
\begin{align*} [B^T A^T]_{12} &= [B^T]_{11}[A^T]_{12} + [B^T]_{12}[A^T]_{22} + [B^T]_{13}[A^T]_{32} \\ &= b_{11}a_{21} + b_{21}a_{22} + b_{31}a_{23} \\ &= a_{21}b_{11} + a_{22}b_{21} + a_{23}b_{31} \\ &= [AB]_{21} \end{align*}