## Task 3 - 070833

Let $a$ and $b$ be positive integers.

Find all integers $x$ for which $\frac{a+x}{b-x}=\frac{b}{a}$ holds.
(I) Suppose $x$ is a number with the given property, then we have

$$
\frac{a+x}{b-x}=\frac{b}{a}
$$

from which it follows that $a^{2}+a x=b^{2}-b x$, thus $(a+b) x=b^{2}-a^{2}$. Since $a$ and $b$ are positive, $a+b \neq 0$, and it follows further that

$$
x=\frac{b^{2}-a^{2}}{a+b}=b-a
$$

Therefore, at most the number $x=b-a$ can have the given property.

(II) By reversing these inferences, it follows that it indeed has this property.

From $x=b-a$ it follows that $(a+b) x=b^{2}-a^{2}$, from which $a(a+x)=b(b-x)$. Since further $a \neq 0$ holds and thus $b-x(=a) \neq 0$ as well, it follows further that

$$
\frac{a+x}{b-x}=\frac{b}{a}
$$