Bob has $x$ Euro. $x \in [m..n]$ $m, n \in \mathbb{N}$
If Bob were to buy 9 cars costing $c$ each, he would only have 1 Euro left. $x = 9c + 1$
If Bob were to buy 7 boats costing $b$ each, he would only have 2 Euro left. $x = 7b + 2$
Given $m, n$ find all possible $(x, b, c)$
I empirically found first $x = 37$ and then by adding 63 (since $7*9 = 63$) can find other answers that fall within $[m, n]$ interval.
How would one arrive to first answer ($x = 37$) only through mathematical reasoning?
Note that $x \equiv 2 (\mod 7)$ and $x \equiv 1 (\mod 9)$ and apply the Chinese Remainder Theorem