In S. M. Srivastava's book it is written that,
An occurrence of a variable $v$ in a formula $A$ is bound if it occurs in a subformula of the form $∃vB$; otherwise, the occurrence is called free. A variable is said to be free in $A$ if it has a free occurrence in $A$.
After which it is written that,
In the formula $$x ∈ y ∨ ∃x(x ∈ y)$$ all the occurrences of $y$ are free, the first occurrence of $x$ is free, and other occurrences of $x$ are bound.
I don't understand why the occurrence of $x$ is not bound according to the definition. If we denote $x ∈ y ∨ ∃x(x ∈ y)$ as $P$, $x ∈ y$ as $Q$ and $∃x(x ∈ y)$ as $R$ and then if I argue that,
Both $Q$ and $R$ are subformulas of $P$.
The occurrence of $x$ in $R$ is bound. In other words it occurs in a subformula of $P$ (namely $R$) which is of the form $\exists S$ (where $S$ is $(x\in y)$). Hence the occurrence of $x$ in $P$ is bound.
where will be the mistake in my argument?
The definition is, with emphasis added on the word "occurrence",
It is not the symbol of the variable that may be bound or unbound, but only each individual use (that is, occurrence) of the variable's symbol that is either bound or unbound.
In the case of $x \in y \lor \exists x(x \in y)$, the symbol $x$ appears more than once. The rightmost appearance of the symbol $x$ is an occurrence of a variable and it does indeed appear in a subformula of the form $\exists x B$, therefore that occurrence of $x$ is bound. The leftmost appearance of the symbol $x$ is a separate occurrence of a variable, it does not appear in any subformula of the form $\exists x B$, and therefore that occurrence of $x$ is not bound.
Further discussion:
Some sources will write, "The variable $x$ is bound in $P$", meaning that there is an occurrence of $x$ that is bound in $P$. These same sources may also write, "The variable $x$ is free in $P$", meaning that there is an occurrence of $x$ that is free in $P$. I think it would be very unusual for any mathematician to write simply "the variable $x$ is bound" when what they meant was that all occurrences of $x$ are bound.
As we have found that it is possible for the same symbol, $x$, to occur as both a free occurrence of a variable and a bound occurrence of a variable within the same formula, sometimes a text on first-order logic (for example the Wikipedia article on that topic) will include a statement of the form "$x$ is both free and bound in $P$." What this means is that there is at least one free occurrence of $x$ in $P$, and there is also at least one bound occurrence of $x$ in $P$.
I think there is a legitimate question about whether it is proper to write something like, "The variable $x$ is bound in $P$." The concern is that when you have both free and bound occurrences of the same symbol $x$ in a formula, they do not behave like a single variable, and it is questionable what is might be that we might mean by "the variable $x$." For example, a value can be assigned to a free variable; when we assign a value to a free occurrence of $x$ in $P$, that assignment must also assign the same value to all free occurrences of $x$ in $P$, but that assignment does not assign a value to any bound occurrence of $x$ in $P$. The only way I can make sense of this is to assume that the phrase "the variable $x$ is bound" is meant to be read as "one or more occurrences of a variable named $x$ are bound." Since the latter phrasing is somewhat lengthy and clumsy, it is not hard to imagine why mathematicians would have adopted a more compact phrasing as shorthand for the longer statement.