I've been working on problem 3.1 of chapter II of Hartshorne, and have been stuck for a while. I found a proof that seems satisfactory, but every solution I have seen online uses a more involved argument, so I'm guessing that it is wrong.
Hartshorne defines a morphism $f \colon X \to Y$ of schemes to be locally of finite type if there exists an open cover of $Y$ by affine schemes $V_i = \text{Spec} \,B_i$, such that, for each $i$, $f^{- 1}(V_i)$ can be covered by rep affine subsets $U_{ij} = \text{Spec} \, A_{ij}$, such that the induced homomorphism of rings $f^\sharp \colon B_i \to A_{ij}$ gives $A_{ij}$ the structure of a finitely generated $B_i$-algebra.
The problem I am working on is proving that this is a local property, that is, for any open affine subset $V = \text{Spec} \, B$ of $Y$, $f^{-1}(V)$ may be covered by open affine subsets $U_i = \text{Spec} \, A_i$, where each $A_i$ is a finitely generated $B$-algebra. This is my tentative "proof:"
Since $f$ is locally of finite type, we have open cover $\{V_i\} = \{\text{Spec} \, B_i\}$ for $Y$ such that, for each $i$,
$$f^{-1}(\text{Spec} \, B_i) \subset \bigcup_j \text{Spec} \, A_{ij},$$ where $A_{ij}$ is a finitely generated $B_i$-algebra, for each $j$. $V \cap V_i$ may be covered by simultaneously distinguished open subsets $D_B(g) = D_{B_i}(h_i)$. Since $D_{B_i}(h_i) \cong \text{Spec} \, (B_i)_{h_i}$ , and
$$f^{-1}(\text{Spec} \, \big(B_i)_{h_i}\big) \subset \bigcup_j \text{Spec} \, (A_{ij})_{h_i},$$
and $(A_{ij})_{h_i}$ is finitely generated as a $(B_i)_{h_i}$-algebra, we see that $D_B(g) = D_{B_i}(g^i)$ satisfies the property we are trying to prove. Since $\{V_i\}$ covers $Y$, $\{V \cap V_i\}$ covers $V$, meaning we have open cover $\{D_{B_i}(h_i)\}$ for $V$, thus open cover $\{D_B(g)\}$ for $V$. As an affine scheme, $V$ is quasi-compact, meaning there exists a finite subcover. Thus we have finitely many elements $g_1, \dots , g_n$ of $B$ such that $D_B(g_1), \dots , D_B(g_n)$ cover $V = \text{Spec} \, B$, meaning $\langle g_1, \dots , g_n\rangle = B$.
Using standard inverse image properties, we have that
$$f^{- 1}(V) = f^{-1}\left(\bigcup_{k = 1}^n D_B(g_k)\right) = \bigcup_{k = 1}^n f^{-1}\big(D_B(g_k)\big),$$
Each $D_B(g_k)$ has an inverse image covered by elements of the form $\text{Spec} (A_{ij})_{h_i}$, with $(A_{ij})_{h_i}$ finitely generated as a $(B_i)_{h_i}$-algebra, thus as a $B_{g_k}$-algebra. Therefore $f^{-1}(V)$ can be covered by elements of the form $\text{Spec} (A_{ij})_{h_i}$. As $(A_{ij})_{h_i}$ is finitely generated as a $B_{g_k}$-algebra, we have that
$$ (A_{ij})_{h_i} \cong B_{g_k}[x_1, \dots , x_n]/I,$$ yet this means that $$(A_{ij})_{h_i} \cong B[x_1, \dots , x_n, 1/g_k]/I,$$ which would imply that $(A_{ij})_{h_i}$ is finitely generated as a $B$-algebra.This holds for each $A_{ij}$, meaning that $V = \text{Spec} \, B$ satisfies the desired property, and we are done.
Yet all of the other proofs of this that I have seen use the fact that if $\langle f_1, \dots , f_n \rangle = A$, and each $A_{f_i}$ is a finitely generated $B$-algebra, then so is $A$. Is my proof alright? I feel like I must have missed something obvious, but I can't find an error. These other proofs that I have seen for this property have been thoroughly unsatisfying, so if anyone has a better, cleaner proof that they know of, I'd love to see it. Thanks in advance for any help or hints or anything!