I am trying to prove that morphisms of finite type are stable under base change, but I am having some trouble moving from the case where everything is affine to the general case. Suppose $f:X \rightarrow Y$ is a morphism of finite type and Y' is a $Y$-scheme. I want to show that the morphism g: X \times_Y Y' \rightarrow Y' is of finite type. In the case that $X$, $Y$, and Y' are affine, I understand why this is true. For the general case, by a lemma in Liu's book, it is enough to show that there is an affine open cover $\{V_i\}_i$ of Y' such that for each $i$, $g^{-1}(V_i)$ is a finite union of affine open subsets $U_{ij}$ such that for each $i$ and $j$, $O_X(U_{ij})$ is a finitely generated algebra over $O_Y(V_i)$. Here is my attempt at proving this.
Choose an affine open cover $\{V_i\}_i$ of Y'. Is it true that $g^{-1}(V_i)=X \times_Y V_i$? I think this should follow from how we constructed the fibered product by gluing. Since $f:X \rightarrow Y$ is of finite type, we may choose an affine open cover $\{Y_j\}$ of $Y$ such that $f^{-1}(Y_j)$ is covered by a finite number of affine opens $W_{jk}$. Now, $W_{jk} \times_Y V_i$ are open subschemes that cover $X \times_Y V_i$, but since $Y$ is not necessarily affine, these schemes are not necessarily affine, right? Furthermore, if we are using the $W_{jk}$ to cover all of $X$, there could be infinitely many of them. To make the $W_{jk} \times_Y V_i$ affine, we could further cover them with $W_{jk} \times_{Y_k} V_i$, but we are not guaranteed finitely many $Y_k$ either, so while these schemes will be affine, there will not necessarily be finitely many. I have been having some trouble with these sorts of arguments where one can immediately reduce to the affine case, and some help here would be greatly appreciated.