[proofplan]
We express $\alpha$ as the tautological composition $\mathrm{id}_V^{-1} \circ \alpha \circ \mathrm{id}_U$, where the identity maps serve to translate between the old and new bases. The matrices of $\mathrm{id}_U$ and $\mathrm{id}_V$ in mixed bases are the change-of-basis matrices $P$ and $Q$, and two applications of [Composition Corresponds to Matrix Multiplication](/theorems/383) yield $B = Q^{-1}AP$.
[/proofplan]
[step:Identify $P$ and $Q$ as matrices of identity maps in mixed bases]
The matrix $P \in \mathrm{GL}_m(\mathbb{F})$ has $i$th column equal to the coordinates of $u_i$ in the basis $(e_1, \dots, e_m)$: $u_i = \sum_{k=1}^m P_{ki}\, e_k$. This is the matrix of $\mathrm{id}_U: U \to U$ with respect to the bases $(u_i)$ (domain) and $(e_i)$ (codomain).
Similarly, $Q \in \mathrm{GL}_n(\mathbb{F})$ has $j$th column equal to the coordinates of $v_j$ in the basis $(f_1, \dots, f_n)$: $v_j = \sum_{l=1}^n Q_{lj}\, f_l$. This is the matrix of $\mathrm{id}_V: V \to V$ with respect to the bases $(v_j)$ (domain) and $(f_j)$ (codomain).
[guided]
The change-of-basis matrix $P$ records how to express each new basis vector $u_i$ in terms of the old basis vectors $e_k$.
Since $\mathrm{id}_U(u_i) = u_i = \sum_{k=1}^m P_{ki}\, e_k$, the matrix of $\mathrm{id}_U$ with domain basis $(u_i)$ and codomain basis $(e_i)$ is precisely $P$.
The $i$th column of $P$ contains the coordinates of $u_i$ in the basis $(e_k)$.
The same reasoning applies to $Q$.
Since $\mathrm{id}_V(v_j) = v_j = \sum_{l=1}^n Q_{lj}\, f_l$, the matrix of $\mathrm{id}_V$ with domain basis $(v_j)$ and codomain basis $(f_j)$ is $Q$.
Both $P$ and $Q$ are invertible because the identity map is an isomorphism, and an isomorphism between finite-dimensional spaces has an invertible matrix representation.
[/guided]
[/step]
[step:Express $\alpha$ as a three-fold composition translating between bases]
The map $\alpha: U \to V$ factors as
\begin{align*}
\alpha = \mathrm{id}_V^{-1} \circ \alpha \circ \mathrm{id}_U,
\end{align*}
where we read the composition as
\begin{align*}
(U, (u_i)) \xrightarrow{\mathrm{id}_U} (U, (e_i)) \xrightarrow{\;\alpha\;} (V, (f_j)) \xrightarrow{\mathrm{id}_V^{-1}} (V, (v_j)).
\end{align*}
The matrix of $\mathrm{id}_U$ (from $(u_i)$ to $(e_i)$) is $P$. The matrix of $\alpha$ (from $(e_i)$ to $(f_j)$) is $A$. The matrix of $\mathrm{id}_V^{-1}$ (from $(f_j)$ to $(v_j)$) is $Q^{-1}$.
[/step]
[step:Apply matrix multiplication to obtain $B = Q^{-1}AP$]
By the [Composition Corresponds to Matrix Multiplication](/theorems/383) theorem applied twice, the matrix of the composition $\mathrm{id}_V^{-1} \circ \alpha \circ \mathrm{id}_U$ is
\begin{align*}
B = Q^{-1} A P.
\end{align*}
This is the matrix of $\alpha$ with respect to the bases $(u_i)$ and $(v_j)$.
[/step]