$B$ is finitely generated as an $A$-module iff $B$ is finitely generated as an $A$-algebra and integral. I am trying to prove that if $B/A$ is a commutative ring extension then $B$ is finitely generated as an $A$-module iff $B$ is finitely generated as an $A$-algebra and $B$ is integral over $A.$ The converse is I think easy.
Suppose $B$ is finitely generated as an $A$-algebra and is integral over $A.$ Then, $B = A[f_1, ..., f_n] = A[f_1, ..., f_{n - 1}][f_n]$ is finitely generated as an $A[f_1, ..., f_{n - 1}]$-module. Repeat for $f_{n - 1}, ..., f_1.$ We can see that $B$ is then finitely generated as an $A$-module. However, I am having trouble proving the other way. Can I have a hint please? 
Edit for a question to Bernard: 
Are you saying that because 
$$\begin{vmatrix}
    x - a_{11}       & -a_{12} & \dots & -a_{1n} \\
    -a_{21}      & x - a_{22} & \dots & -a_{2n} \\
    \vdots & & \ddots & \vdots \\
    -a_{n1}       & -a_{n2} & \dots & x - a_{nn}
\end{vmatrix} 
\begin{bmatrix}
    b_1 \\
    b_2 \\
    \vdots \\
    b_n
\end{bmatrix}
= 0$$ and since the column matrix is not $0$ that 
$$
\begin{vmatrix}
    x - a_{11}       & -a_{12} & \dots & -a_{1n} \\
    -a_{21}      & x - a_{22} & \dots & -a_{2n} \\
    \vdots & & \ddots & \vdots \\
    -a_{n1}       & -a_{n2} & \dots & x - a_{nn}
\end{vmatrix} = 0?$$
 A: Here it is: for any $x \in B$, consider the $A$-endomorphism of $B$ $\;m_x\colon b\longmapsto xb$, and let $b_1, \dots, b_n$  a system of generators of $B$ as an $A$-module. Each $xb_i$ is a linear combination of the $b_i$s ($1\le i\le n$). So we have a linear system:
\begin{cases}
xb_1=a_{11}b_1+a_{12}b_2+\dots +a_{1n}b_n\\
xb_2=a_{21}b_1+a_{22}b_2+\dots +a_{21}b_n\\
\qquad\vdots\\
xb_n=a_{n1}b_1+a_{n2}b_2+\dots +a_{nn}b_n
\end{cases}
where the $a_{i,j} \in A$ for all $i , j$, which we can rewrite matricially as
$$\begin{bmatrix}
x-a_{11}&-a_{12}&\dots&-a_{1n}\\
-a_{21}&x-a_{22}&\dots&-a_{2n}\\
\vdots&&\ddots&\vdots\\
-a_{n1}&-a_{n2}&\dots& x-a_{nn}
\end{bmatrix}
\begin{bmatrix}
b_1\\b_2\\\vdots\\b_n
\end{bmatrix}=0$$
Multiplying on the left by the adjugate of this matrix we deduce that its determinant kills all the generators of $b$, hence it kills $1$, so that
$$\begin{vmatrix}
x-a_{11}&-a_{12}&\dots&-a_{1n}\\
-a_{21}&x-a_{22}&\dots&-a_{2n}\\
\vdots&&\ddots&\vdots\\
-a_{n1}&-a_{n2}&\dots& x-a_{nn}
\end{vmatrix}=0$$
and this determinant is a monic polynomial in $x$.
