I have to see for which value of $a$ this system is solvable: $$ \begin{cases} 3x \equiv a\pmod{28}\\ ax \equiv4\pmod{21}\\ \end{cases} $$ I check the two congruences separately: $$ \gcd(3,28)=1\mid a\;\checkmark $$ $$ \gcd(a,21)\mid4 \iff \gcd(a, 21) = 1 \iff a \not\equiv 0\;(7)\;\land a \not\equiv 0\;(3) $$
$$ \begin{cases} 3x \equiv a\pmod{4}\\ ax \equiv4\pmod{3}\\ \end{cases}\\ \gcd(4,3) = 1\;\checkmark $$ $$ \begin{cases} 3x \equiv a\pmod{7}\\ ax \equiv4\pmod{7}\\ \end{cases} $$ and from here I can't go on.
So, my problem is that I can't figure out how to check if a system of congruences is solvable.
EDIT:
maybe I found the solution: $ \gcd(7,7) = 7\mid a-4 \iff a = 11+7k \land a \not\equiv 0\;(7)$
There is no $a$ for which the system is solvable. By the Chinese Remainder Theorem, $$ 3x \equiv a \pmod{28} \\ ax \equiv 4 \pmod{21} $$ is equivalent to solving: $$ 3x \equiv a \pmod{7} \\ 3x \equiv a \pmod{4} \\ ax \equiv 4 \pmod{7} \\ ax \equiv 4 \pmod{3} \\ $$
Note that the first equations tells us $x \equiv 5a \pmod{7}$, and the third equation tell us $5a^{2} \equiv 4 \pmod{7} \implies a^{2} \equiv 5 \pmod{7}$, but $5$ is not a quadratic residue mod $7$. The quadratic residue are $1,2,4$ mod $7$. Hence, there is no solution. Let me know if you have any questions.