Question on Durett 5.1.11 
Show that if $X$ and $Y$ are random variables with $\mathbb{E}(Y~|
~ \mathcal{G}) = X$ and $\mathbb{E}(X^2) =\mathbb{E}(Y^2) < \infty$,
  then $X=Y$ a.s.

So, I'm following definitions given to us. 
Since $\mathbb{E}(X^2), \mathbb{E}(Y^2) < \infty$ it follows $X,Y \in L^2(\Omega, \Sigma, \mathbb{P}) \subseteq L^1(\Omega, \Sigma, \mathbb{P})$.
Now, Durett, doesn't define what is $\mathcal{G}$, so i need to guess, and i make a favorable guess $\mathcal{F} \subseteq \mathcal{G} \subseteq \Sigma$ - $\sigma$-algebras.
Then, i use $\mathbb{E}(X~|~\mathcal{F}) = \mathbb{E}(\mathbb{E}(Y~|~\mathcal{G})~|~\mathcal{F}) = \mathbb{E}(Y~|~\mathcal{F})$ a.s., by the, what we've proved as Tower Property.
Using linearity I deduce $\mathbb{E}(X-Y~|~\mathcal{F}) = 0$ a.s.
So for any $A \in \Sigma$ $$\mathbb{E}(\mathbb{E}(X-Y~|~\mathcal{F})\cdot 1_{A}) = 0$$ which by definition lead to  $$\mathbb{E}((X-Y)\cdot 1_{A}) = 0$$
So $(X-Y) = 0$ a.s. and $X = Y$ a.s.
And my question is

Why did i need $\mathbb{E}(X^2) =\mathbb{E}(Y^2)$? And why it is not
  enough just to assume $X, Y \in L^1(\Omega, \Sigma, \mathbb{P})$?

 A: It should be clear that it is not enough to just assume that $X,Y \in L^1$ since then the statement would just be that the conditional expectation map is the identity on $L^1$ and we wouldn't be interested in studying it. (Thankfully it's also clear that this is not the case)
There are a couple of problems with your attempted proof. First I'm quite confused as to why you introduced $\mathcal{F}$ at all. You have a probability space $(\Omega, \Sigma, \mathbb{P})$ and a sub-$\sigma$-algebra $\mathcal{G}$ of $\Sigma$. $\mathcal{F}$ doesn't appear anywhere here. In fact, you'd get the most information by taking $\mathcal{F} = \mathcal{G}$ since that would give you the conditional expectation property for the largest number of sets whilst keeping $\mathbb{E}[X-Y \mid \mathcal{F}] = 0$. 
Unfortunately even $\mathbb{E}[X-Y \mid \mathcal{G}] = 0$ is not enough to see $X = Y$. There are two problems with your attempt to show this implication. Firstly $\mathbb{E}[\mathbb{E}[(X-Y) \mid \mathcal{F}] \mathbb{1}_A] = 0$ only gives you $\mathbb{E}[(X-Y) \mathbb{1}_A] = 0$ for $A \in \mathcal{F}$ since you need to be able to take $\mathbb{1}_A$ inside the conditional expectation. Then from $\mathbb{E}[(X-Y) \mathbb{1}_A] = 0$ for every $A \in \mathcal{G}$ you don't get $X = Y$ since $(X-Y)$ is not necessarily $\mathcal{G}$-measurable.
The way this exercise is usually solved is by instead showing $\mathbb{E}[(X-Y)^2] = 0$ which isn't too difficult by expanding $(X-Y)^2$ and taking a conditional expectation in the right place. This is enough to show $X=Y$ since $(X-Y)^2$ is non-negative so $\mathbb{E}[(X-Y)^2] = 0$ implies $(X-Y)^2 = 0$.
