4. Find two numbers whose sum is 2017, and the sum of the numbers written with the same digits but in reverse order is 8947.
Solution. Let the first desired number be $\overline{a b c d}$, and the second be $\overline{\text { efgh }}$. These numbers are such that $\overline{a b c d} \geq \overline{e f g h}$. Note that $d$ and $h$ can sum to either 7 or 17. If $d+h=7$, then $\overline{a b c d}$ and $\overline{e f g}$ are four-digit numbers, $c=g=9$ (otherwise $\overline{d c b a}+\overline{h g f e}17000$ (denote the second number as $\overline{f g h}$ ). If $d+h=17$, then one of these numbers is 8, the other is 9. Clearly, $d=8, h=9$. Further, $c+g$ can equal either 10 or 0 to satisfy $\overline{a b c d}+\overline{f g h}=2017$. Regardless of this, $f>0$, so $a=1$, and thus $f=6$ (from $\overline{d c b a}+\overline{h g f}=8947$ ). If $f=6$, then there are two possible cases: 1) $b=4$ and $c=g=0$, 2) $b=3$ and $c+g=10$. For the second case: if $b=3$, then $g=1$ (from $\overline{d c b a}+\overline{h g f}=8947$ ), then $c=9$ - this set of values does not satisfy the problem's condition. Therefore, $b=4$ and $c=g=0$. Thus, $\overline{a b c d}=1408, \overline{f g h}=609$.

Remark. 1) If the student determined that one of the numbers must be a three-digit number, points can be awarded (1-2).

Answer: $1408,609$.