Artificial intelligent assistant

Flock of Pigeons - Thousand and One Nights I am trying to wrap my head around a simple puzzle - building a system of linear equations to solve the following piece from a Thousand and One Nights: > A flock of pigeons alighted upon a tree, some perching upon the upper branches and some upon the lower; those upon the upper branches said to those upon the lower: "If one of you flies up to us our number will be double yours; if one of us flies down to you, our numbers will be equal."

Upper branch has $x$ pigeons, lower has $y$.

> Top branch said: "If one of you flies up to us our number will be double yours":

Well, if one of the bottom branch flies up, the top branch will have $x+1$ birds and the bottom will have $(y-1)$. The top will have double the bottom, so:

$$x + 1 = 2(y-1)$$

> Top branch said: "If one of us flies down to you, our numbers will be equal":

Now, the top branch will have $x-1$ and the bottom $y+1$. The numbers should be equal:

$$x-1 = y+1$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ad097379218d85ff4f569c4b5028a203