2. Determine the four-digit number $\overline{x y z t}$ whose sum of digits is 17, if all digits are different and satisfy the equations

$$
2 x=y-z \quad \text { and } \quad y=t^{2}
$$
Solution. Since $y \leq 9$ and $y=t^{2}$, we get $t \leq 3$.

For $t=0$, we get $t=0=y$, which is not possible, and for $t=1$, we get $t=1=y$, which is also not possible.

Let $t=2$; then $y=4$, so from $2 x=y-z$ we get $2 x=4-z$. From here it is clear that $z$ is an even number less than 4. The following cases are possible:

$1^{\circ} z=0$, but then $x=2=t$

$2^{\circ} z=2$, this is not possible because $z \neq t$.

$3^{\circ} z=4$, but then $x=0$, so the number is not a four-digit number.

Thus, it is not possible for $t=2$.

Let $t=3$. Then $y=9$, so from $2 x=y-z$, we get $2 x=9-z$. From here it is clear that $z$ is an odd number. The following cases are possible:

$1^{\circ} z=1, x=4, \overline{x y z t}=4913$ and the sum of the digits is 17;

$2^{\circ} z=3, x=3$ which is not possible;

$3^{\circ} z=5, x=2, \overline{x y z t}=2953$, but the sum of the digits is 19;
$4^{\circ} z=7, x=1, \overline{x y z t}=1973$, but the sum of the digits is 20;

$5^{\circ} z=9, x=0$, which is not possible because according to the condition of the problem $\overline{x y z t}$ is a four-digit number.

Thus, the only solution is $\overline{x y z t}=4913$.