[proofplan]
We first factor $B$ through the image of the associated [linear map](/page/Linear%20Map) $\Phi_B: V \to W^*$ by using that image as the intermediate space and the evaluation pairing with $W$. For minimality, any other factorization through a finite-dimensional intermediate space determines a linear map into $W^*$, and composing with the map from $V$ to that intermediate space recovers $\Phi_B$. This shows that the image of $\Phi_B$ is contained in the image of the induced map into $W^*$, so the intermediate space must have dimension at least $\operatorname{rank}(B)$.
[/proofplan]
[step:Construct the canonical factorization through $\operatorname{im}(\Phi_B)$]
Let
\begin{align*}
U := \operatorname{im}(\Phi_B) \subseteq W^*
\end{align*}
be the image subspace of $W^*$. Since $W$ is finite-dimensional over $k$, the [vector space](/page/Vector%20Space) $W^*$ is finite-dimensional, and therefore $U$ is finite-dimensional. By definition,
\begin{align*}
\dim_k U = \dim_k \operatorname{im}(\Phi_B) = \operatorname{rank}(B).
\end{align*}
Define the $k$-linear map
\begin{align*}
a: V \to U, \qquad v \mapsto \Phi_B(v).
\end{align*}
This is well-defined because $\Phi_B(v) \in \operatorname{im}(\Phi_B) = U$ for every $v \in V$. It is $k$-linear because it is the corestriction of the $k$-linear map $\Phi_B: V \to W^*$ to its image.
Define
\begin{align*}
C: U \times W \to k, \qquad (f,w) \mapsto f(w).
\end{align*}
This is well-defined because each element $f \in U$ is a linear functional $f: W \to k$. To verify $k$-bilinearity, fix $f_1,f_2 \in U$, $w_1,w_2 \in W$, and $\lambda \in k$. Linearity in the first variable gives
\begin{align*}
C(f_1+\lambda f_2,w_1) = (f_1+\lambda f_2)(w_1) = f_1(w_1)+\lambda f_2(w_1) = C(f_1,w_1)+\lambda C(f_2,w_1).
\end{align*}
Linearity in the second variable gives
\begin{align*}
C(f_1,w_1+\lambda w_2) = f_1(w_1+\lambda w_2) = f_1(w_1)+\lambda f_1(w_2) = C(f_1,w_1)+\lambda C(f_1,w_2).
\end{align*}
For all $v \in V$ and $w \in W$,
\begin{align*}
C(a(v),w) = C(\Phi_B(v),w) = \Phi_B(v)(w) = B(v,w).
\end{align*}
Thus a factorization exists through a space of dimension $\operatorname{rank}(B)$.
[guided]
The natural intermediate space is not an arbitrary vector space: it is the collection of all functionals on $W$ that are produced by fixing the first argument of $B$. Define
\begin{align*}
U := \operatorname{im}(\Phi_B) \subseteq W^*.
\end{align*}
Because $W$ is finite-dimensional over $k$, its [dual space](/page/Dual%20Space) $W^*$ is finite-dimensional, and every subspace of a finite-dimensional vector space is finite-dimensional. Hence $U$ is finite-dimensional. By the definition of the rank of the [bilinear form](/page/Bilinear%20Form),
\begin{align*}
\dim_k U = \dim_k \operatorname{im}(\Phi_B) = \operatorname{rank}(B).
\end{align*}
Now define the map through which $B$ will factor:
\begin{align*}
a: V \to U, \qquad v \mapsto \Phi_B(v).
\end{align*}
This is the corestriction of $\Phi_B$ from codomain $W^*$ to the smaller codomain $\operatorname{im}(\Phi_B)$. The map is well-defined because $\Phi_B(v)$ belongs to $\operatorname{im}(\Phi_B)$ by definition of image. It is $k$-linear because the original map $\Phi_B: V \to W^*$ is $k$-linear, and changing the codomain to the image does not change the formula for the map.
The remaining operation should recover the value of the functional $\Phi_B(v)$ at the vector $w$. Define
\begin{align*}
C: U \times W \to k, \qquad (f,w) \mapsto f(w).
\end{align*}
This is well-defined because every element $f \in U$ is, by construction, an element of $W^*$, hence a $k$-linear functional $f: W \to k$.
We verify bilinearity explicitly. If $f_1,f_2 \in U$, $w_1,w_2 \in W$, and $\lambda \in k$, then linearity in the first variable follows from the vector space operations in $W^*$:
\begin{align*}
C(f_1+\lambda f_2,w_1) = (f_1+\lambda f_2)(w_1) = f_1(w_1)+\lambda f_2(w_1) = C(f_1,w_1)+\lambda C(f_2,w_1).
\end{align*}
Linearity in the second variable follows from the fact that $f_1: W \to k$ is a $k$-linear functional:
\begin{align*}
C(f_1,w_1+\lambda w_2) = f_1(w_1+\lambda w_2) = f_1(w_1)+\lambda f_1(w_2) = C(f_1,w_1)+\lambda C(f_1,w_2).
\end{align*}
Therefore $C$ is $k$-bilinear.
Finally, for every $v \in V$ and $w \in W$, the definitions give
\begin{align*}
C(a(v),w) = C(\Phi_B(v),w) = \Phi_B(v)(w) = B(v,w).
\end{align*}
Thus $B$ factors through $U = \operatorname{im}(\Phi_B)$, and the dimension of this intermediate space is exactly $\operatorname{rank}(B)$.
[/guided]
[/step]
[step:Show that every factorization has dimension at least $\operatorname{rank}(B)$]
Suppose $r \geq 0$ is an integer for which there exist a finite-dimensional $k$-vector space $U$ with $\dim_k U = r$, a $k$-linear map
\begin{align*}
a: V \to U,
\end{align*}
and a $k$-bilinear map
\begin{align*}
C: U \times W \to k
\end{align*}
such that $B(v,w)=C(a(v),w)$ for all $v \in V$ and $w \in W$.
Define the $k$-linear map
\begin{align*}
\Psi: U \to W^*, \qquad u \mapsto \bigl(w \mapsto C(u,w)\bigr)
\end{align*}
for $u \in U$. For each $u \in U$, the map $\Psi(u): W \to k$ is $k$-linear because $C$ is linear in its second variable. The map $\Psi: U \to W^*$ is $k$-linear because $C$ is linear in its first variable.
For every $v \in V$ and $w \in W$,
\begin{align*}
(\Psi \circ a)(v)(w) = \Psi(a(v))(w) = C(a(v),w) = B(v,w) = \Phi_B(v)(w).
\end{align*}
Thus the functionals $(\Psi \circ a)(v)$ and $\Phi_B(v)$ agree on every $w \in W$, so
\begin{align*}
\Phi_B = \Psi \circ a.
\end{align*}
Consequently,
\begin{align*}
\operatorname{im}(\Phi_B) = \operatorname{im}(\Psi \circ a) \subseteq \operatorname{im}(\Psi).
\end{align*}
Let $(u_1,\dots,u_r)$ be a basis of $U$ if $r>0$; if $r=0$, then $U=\{0\}$ and the same conclusion below is immediate. When $r>0$, the image $\operatorname{im}(\Psi)$ is spanned by $(\Psi(u_1),\dots,\Psi(u_r))$, so
\begin{align*}
\dim_k \operatorname{im}(\Psi) \leq r.
\end{align*}
Therefore
\begin{align*}
\operatorname{rank}(B) = \dim_k \operatorname{im}(\Phi_B) \leq \dim_k \operatorname{im}(\Psi) \leq r.
\end{align*}
Every factorization through a finite-dimensional space of dimension $r$ therefore satisfies $r \geq \operatorname{rank}(B)$.
[/step]
[step:Conclude the least possible factorization dimension]
The first step constructs a factorization of $B$ through a finite-dimensional vector space of dimension $\operatorname{rank}(B)$. The second step shows that any factorization of the stated form through a finite-dimensional vector space of dimension $r$ must satisfy $r \geq \operatorname{rank}(B)$. Hence $\operatorname{rank}(B)$ is exactly the least integer $r \geq 0$ for which such a factorization exists.
[/step]