$Proof$.
Define the sets $B_n$ by $B_1=B$ and for every $n\ge 1$, $B_{n+1}=f(\bigcup_{i=1}^{n} B_{n}\times\bigcup_{i=1}^{n} B_{n})$. Let $C=\bigcup_{i=1}^{\infty} B_{i}$. We show that $C$ is the closure of $B$ under $f$.
- $B\subseteq C\subseteq A$.
Clearly $B=B_1\subseteq C$. And since every $B_i\subseteq A$, then $C\subseteq A$. - $C$ is closed under $f$
Take any $x,y\in C$. Then $(x,y)\in B_j\times B_k$ for some $j,k$ by definition of $C$. Without loss of generality suppose $j<k$. Then $(x,y)\in\bigcup_{i=1}^{k} B_i\times\bigcup_{i=1}^{k} B_i$, and so $f(x,y)\in f(\bigcup_{i=1}^{k} B_i\times\bigcup_{i=1}^{k} B_i)=B_{k+1}$. Therefore $f(x,y)\in\bigcup_{i=1}^{\infty}B_i=C$, and hence $C$ is closed under $f$. - $C$ is the minimum
Suppose that $D$ is a set with $B\subseteq D\subseteq A$, and that $D$ is closed under $f$. We prove by induction that for any $k\ge 1$, $\bigcup_{i=1}^{k}B_i\subseteq D$.
$Base$: For $k=1$, $\bigcup_{i=1}^{1}B_i=B\subseteq D$ by assumption.
$Step$: Suppose $\bigcup_{i=1}^{k}B_i\subseteq D$ and $f(x,y)\in B_{k+1}=f(\bigcup_{i=1}^{k} B_{i}\times\bigcup_{i=1}^{k} B_{i})$. Then $(x,y)\in\bigcup_{i=1}^{k} B_{i}\times\bigcup_{i=1}^{k} B_{i}\subseteq D\times D$, which means $f(x,y)\in D$, since $D$ is closed under $f$. Therefore $\bigcup_{i=1}^{k}B_i\cup B_{k+1}=\bigcup_{i=1}^{k+1}B_i\subseteq D$.
Is my proof valid? I'm curious especially about the induction part, does it work? I haven't studied infinity yet, but if I show that a property holds for when the limit is any natural number, does it prove that the property holds when the limit is infinity? What i mean is that $C$ is defined to have infinity as limit.
I'm assuming that you're thinking of $f$ as a binary operation, so that the closure of $B$ under $f$ means "the smallest superset $K\supseteq B$ contained in $A$ such that $f(b,b')\in K$ for all $b,b'\in B$."
(If you haven't already done so, it's worthwhile to prove that this is well-defined. That is, that if $B\subseteq C$ and $B\subseteq C'$ with $C$ and $C'$ closed, then there is some $C''$ that is contained in both $C$ and $C'$, such that also $B\subseteq C''$. Hint: Take $C''=C\cap C'$. Yes, it is a routine argument... but it is worth the self-confidence that you can provide such details, since this subtlety appears in many definitions.)
The first two steps are perfect! Nicely done.
The third step is almost entirely correct. The statement "$\bigcup_{i=1}^{k}B_i\subseteq D$ for any $k\geq 1$" would indeed prove the minimality condition, the base case is correct, and the inductive step is morally correct as well. However there is a (possible) small but significant, conceptual error in the first sentence. I'll explain this in the next section.
Before that, I want to address your question about infinity, which is more interesting.
This is a very insightful question, as well as an important one: the answer is NO!
An overly-slick example is the property of "being finte" itself: if $B_i=\{i\}$, then every $\cup_{i=0}^n B_i$ is finite for all $n$, but $\cup_{i=0}^\infty B_i =\mathbb{N}$, which is not.
The reason why we're okay in this problem is essentially that union is an operation that works with each element of the set individually, rather than all at once. More precisely, by definition, if $\mathscr{B}$ is any set of subsets of $A$, then $$ \bigcup \mathscr{B} := \{z\in A: \exists B\in\mathscr{B}, z\in B\}.$$ (This is a surprisingly "low-level" definition in modern math: the existence of such sets is an axiom of ZFC!)
When $\mathscr{B}=\{B_n: n\in\mathbb{N}^+\}$ it is traditional to define the change of notation that appears in this problem, $\bigcup_{n=1}^\infty B_n := \bigcup\mathscr{B}$. Therefore, our statement that $C=\bigcup_{n=1}^\infty B_n \subseteq D$ means: $$ \forall z\in A ~\exists n\in\mathbb{N}^+, z\in B_n \implies z\in D. $$
The point is that for each $z\in C$, there must exist a choice of $n$ which makes it so, and thus $z\in \bigcup_{i=1}^n B_i$.
However, notice that each choice is independent: there need not be any consistency between these choices. The "is infinite" property does require such a consistency.
(To avoid defining infinity, let me tell a parable that captures the difficulty. To count the number of elements in a set, I need to point at them and name them with a number, and the highest number I reach is how many elements there are. Pointing at $\{*\}$, I say "1", and pointing at $\{+\}$, I also say "1". But when I point at $\{*,+\}$, I say "1, 2", giving one of the symbols a new name! This is the sort of inconsistency which "being finite" is sensitive to, but "being a subset of" is not.)
The first sentence of the inductive step should read:
One of the most common errors in inductive proofs is that instead of starting with something in the $n+1$ case and reducing it to the $n$ case, people will start with something in the $n$ case and build it up to the $n+1$ case. This is only valid if you can prove that (1) everything in the $n+1$ case can be built up from the $n$ case— already false for many interesting problems! and (2) the method of "building up" in the proof completely captures everything in the $n+1$ case.
The proof looks as though you are committing this error.* To avoid the appearance of this impropriety, the inductive setup should not be using the fact that $z$ has the form $f(x,y)$. It does, of course, but this is a consequence of the definition of $B_{k+1}$, so you should say that separately.
[* It's not clear to me that you actually misunderstood the induction structure, but that's not necessarily relevant. Proofs are pieces of communication: what matters is how convincing you are to your (skeptical but good-faith) reader. I think a reader in your target audience could reasonably say "I don't believe this induction works; it is clearly malformed". ]