Find an integer $x$ such that $x \equiv 5 \pmod{8}, x \equiv 3 \pmod{9}, x \equiv4 \pmod {7}.$
Attempt: I have tried to put the equations as $x = 5 + 8k$ for some integer $k$ and $x = 3 + 9j$ for some integer $j$, and $x = 4 + 7h$ for some integer $h.$
I am stuck, I don't really understand. Please can anyone please help me.
I would really appreciate the help.
Here is an algorithm that will yield the answer:
Start with $x=8j+5$. Looking at this equation mod $9$, we have
\begin{align} 3 &\equiv 8j +5\; &(\mbox{mod}\; 9) \\ -2 &\equiv 8j\; &(\mbox{mod}\; 9) \\ -16 &\equiv 64j\; &(\mbox{mod}\; 9) \\ 2 &\equiv j \; &(\mbox{mod}\; 9)\end{align} The third line was deduced from trying to find a solution to $8y\equiv 1\; (\mbox{mod}\; 9)$, which gives $y\equiv 8 \; (\mbox{mod}\; 9)$. This is always the hard part to the algorithm.
Now we have that $j=9k+2$ for some integer $k$, so $x=8(9k+2)+5=72k+21$. Then look at this equation mod $7$ to obtain $4\equiv 2k\; (\mbox{mod}\; 7)$. Solve for $k$ and replace $k$ similar to how we replaced $j$.
This process can be continued if you have more equations, and is a little more intuitive than some cold hard formula.