What I have got is the following:
Given: $E[(X-Y)^2]=0 \Rightarrow X=Y \ where \ X,Y\in\mathbb{R}$
$$ E[(X-Y)^2]=0 \Rightarrow Var(X-Y)+E^2[X-Y]=0 $$ Since both terms are non-negative: $$ E^2[X-Y]\geq0 \ , \ Var(X-Y)\geq0 \\ Var(X-Y) =0, E[X]=E[Y] $$
And a random variable with zero variance is a constant. $$ X-Y = c, E[c]=0 \Rightarrow c=0 \Rightarrow X=Y $$
Is there anything wrong with the statement?
Edit: where $c$ is a constant.