I have a question about an argument used in Tamas Szamuely's "Galois Groups and Fundamental Groups" in following excerpt (see page 96):
According the proof we firstly show that $\sum^r _{i=1} e_i [\kappa(Q_i): \kappa(P)]$ equals the dimension $n:= \dim_{\kappa(P)}B/PB$ of the $\kappa(P)$-vector space $B/PB$.
Then we take $t_1, ..., t_n \in B$ whose images in can projection $B \to B/PB$ form a $\kappa(P)$-basis of it.
By Nakayama (since $A_P$ local ring with maximal ideal $P$) these $t_i$ also generate the $A_P$-module $B \otimes _A A_P$.
What I don't understand is how does it imply that then the $t_i$ also generate $L$ as $K$-vector space.

I think this is by extension of scalars, because $$(B \otimes _A A_P)\otimes_{A_P}K\simeq B\otimes_A K\simeq L.$$ The last isomorphism results from $B_P$ being finitely generated over $A_P$, $B\otimes_A K$ is finitely generated over $K$, and an integral domain, hence it is a field containing $B$.