<s>[INST] Find the digits of a number Consider the following statement!
$\overline{ABCD}+\overline{EFG}=8768$, and $\overline{ABC}+\overline{DEFG}=6005$.
If $A,\,B,\,C,\,D,\,E,\,F,$ and $G$ are different numbers, Then, what is $\overline{ABCD}$?
My idea is :
$$\begin{aligned}
&\overline{ABCD}+\overline{EFG}=8768\\
&1000(A)+100(B+E)+10(C+F)+(D+G)=8768\\
&\begin{cases}
&A=8\\
&B+E=7\\
&C+F=6\\
&D+G=8
\end{cases}
\end{aligned}
$$
But i don't think that this is the best idea. Cz when i tried to solve this, i got the wrong numbers that doesn't satisfied the equation.
Please help.
 [/INST] When you have $X+Y\le 9+9$ the most you can carry is $1$. 
And if you have $X+Y+1\le 9+9+1$ the most you can carry is $1$.
So you can never carry more than one.  Now if you have $X+Y\to 0$ that means $X+Y$ or $X+Y + 1=10$ and you do carry $1$ to the next column.
So
$\overline{ABC} + \overline{DEFG} = 6005$
has $A+E\to 0$ so we carry and $D+1 = 6$ and $D=5$.
So
$\overline{ABCD}+\overline{EFG}= \overline{ABC}5+\overline{EFG}=8768$
$5 + G = 8$ or $5+G =18$ but $5+G \le 14$ so $G= 3$.
$\overline{ABC} + 5\overline{EF}3 = 6005$
$C+3 = 15$ or $C+3 = 5$ but $C+3 \le 12$ so $C+3 =5$ so $C=2$.
$\overline{ABCD}+\overline{EFG}= \overline{AB}25+\overline{EF}3=8768$
So $F+2=6$ (obviously not $16$) so $F = 4$
$\overline{AB}2 + 5\overline{E}43 = 6005$
So $B+4=10$ and $B=6$
$\overline{A}625+\overline{E}43=8768$
$6+E = 7$ so $E=1$ 
And $\overline A625 +143=8768$ and $\overline{A}62 + 5143 = 6005$ so
$A=8$ and $A+1+1 =10$.  So $A=8$.
So $\overline{ABCD} = 8625$.
</s>