Conditional expectation of sum of numbers on 2 throws of a dice given their difference Let$  X$ and $Y$ be the numbers obtained on first and second throws of a fair die .
Calculate $E(X+Y|(X-Y)^2=1)$
I am doing basically $$E(X|(X-Y)^2=1)=E(Y|(X-Y)^2=1)$$
So $E(X+Y|(X-Y)^2=1)=2E(X|(X-Y)^2=1)$
$E(X+Y|(X-Y)^2=1)=2E(X|(X-Y)^2=1)$
implies $E(X|(X-Y)^2=1)=1/6(1+2+3+4+5+6)$
So I am getting it $7$ please help

The result is correct.
To "see" the solution observe that throwing 2 fair dice the events that correspond to
$$(X-Y)^2=1$$
are 10
$$\{(1,2);(2,1);(2,3);(3,2);(3,4);(4,3);(4,5);(5,4);(5,6);(6,5)\}$$
given this sample space, the sum $X+Y$ is a rv taking values in
$$ Z=
\begin{cases}
\frac{1}{5},  & \text{if $z=3$}  \\
\frac{1}{5},  & \text{if $z=5$}  \\
\frac{1}{5},  & \text{if $z=7$}  \\
\frac{1}{5},  & \text{if $z=9$}  \\
\frac{1}{5},  & \text{if $z=11$}
\end{cases}$$
Thus
$$\mathbb{E}[Z]=7$$
