It's definitely worthwhile learning a little bit about modular arithmetic for questions such as this.
But if you want to know in very concrete terms how to solve questions such as this, here's an attempt.
Suppose you want a number $n$ (not necessarily the least, we'll handle that later) with remainder $3$ when divided by $5$ and $5$ when divided by $7$, which we write as $n \equiv 3 \mod 5$ and $n \equiv 5 \mod 7$. The Chinese remainder theorem tells us that this is possible, because $5$ and $7$ are
relatively prime, i.e. have no common factor greater than $1$.
We start out by finding integers $x$ and $y$ such that $5 x + 7 y = 1$.
If so, then $5 x = 1 - 7 y$ is an integer $u$ such that $u \equiv 0 \mod 5$ and $u \equiv 1 \mod 7$, while $7 y = 1 - 5 x$ is a number $v$ such that $v \equiv 1 \mod 5$ and $v \equiv 0 \mod 7$. Combining these, $n = 5 u + 3 v$ would have $n \equiv 5 \cdot 0 + 3\cdot 1 = 3 \mod 5$ and $n \equiv 5 \cdot 1 + 3 \cdot 0 = 5 \mod 7$.
The method for finding $x$ and $y$ is called the Euclidean algorithm. It goes like this. We want $5 x + 7 y = 1$. Write $7 = 5 + 2$, so
$5 x + 5 y + 2 y = 5 (x + y) + 2 y$. Thus with $x_1 = x + y$, we want to solve $5 x_1 + 2 y = 1$ (a similar equation to what we started with, but with smaller coefficients). If we can do that, then we can take $x = x_1 - y$. to solve our original equation.
Similarly, $5 = 2 \cdot 2 + 1$, so $5 x_1 + 2 y = x_1 + 2 (2 x_1 + y) = x_1 + 2 y_1$ where $y_1 = 2 x_1 + y$.
But the equation $x_1 + 2 y_1 = 1$ is easy: we can see at a glance that $x_1 = 1$, $y_1 = 0$ is a solution. Then working backwards, $y = y_1 - 2 x_1 = -2$
and $x = x_1 - y = 1 - (-2) = 3$. So we have found $x = 3$ and $y = -2$ such
that $5 x + 7 y = 1$. We then take $u = 5 x = 15$ and $v = 7y = -14$, and
$n = 5 u + 3 v = 33$, which has $n \equiv 3 \mod 5$ and $n \equiv 5 \mod 7$.
Now, $n = 33$ is not the only possible solution. In fact, we could get another solution by adding or subtracting any multiple of $5 \times 7 = 35$.
Since $5$ and $7$ are relatively prime, the theory tells us that those are all the other solutions: if $m$ is another solution, $n - m$ would have to be a multiple of $5$ and a multiple of $7$, and therefore a multiple of $35$.
Now in this particular case $33 - 35$ is negative, in fact $33$ is the smallest positive solution.
Now, what about the original problem with $n \equiv 7 \mod 11$ in addition to $n \equiv 3 \mod 5$ and $n \equiv 5 \mod 7$? We know now that from the first two conditions we need $n$ to differ from $33$ by a multiple of $35$, i.e.
$n \equiv 33 \mod 35$. So we go through a similar procedure, finding
$x$ and $y$ such that $35 x + 11 y = 1$, etc. I'll leave the details to you.
5a + 7b = 1first? oh... computer algorithm is one thing I am quite ok with... but the steps to solve this problem seem so complicated to me... – nonopolarity May 05 '17 at 12:24