Think of a Number/Examples/Bachet/3

Classic Problem

 * The first person takes a number of counters greater than $5$.
 * The second person takes $3$ times as many.
 * The first person gives $5$ counters to the second.
 * The second person then gives the first $3$ times as many as the first person holds in his hand.


 * How many counters has the second person got in his hand?

Solution
$20$

Proof
Let $A$ and $B$ denote the first and second person respectively.

Let $x$ be the number taken by $A$.

Then $B$ takes $3 x$ from $A$.

Then $B$ gives $5$ counters to $A$.

At this point, $A$ has $x = 5$ and $B$ has $3 x + 5$.

Then $A$ gives $3 \paren {x - 5}$ to $B$.

Hence $B$ now has $3 x + 5 - 3 \paren {x - 5}$

Thus, doing the algebra, we see:
 * $3 x + 5 - 3 x + 3 \times 5 = 20$