I'm starting to study diophantic equations and congruence and I have found this problem that I don't know how to solve:
Find $b \in \Bbb Z$ for which exists $a \equiv 4 \pmod 5$ such that $6a+21b=15$.
I can see that the equation is equivalent to $2a + 7b = 5$ and that all $a$ would be of the form $a = -1 + 7s$ and similarly $b = 1-2s$. But I don't understand how to pick $b$ such that $a \equiv 4 \pmod 5$. Any thoughts on how to solve it? Thanks
Notice that if $a\equiv 4 \pmod 5$ then
$$6a+21b \equiv a+b \equiv 0 \pmod 5,$$
so $b \equiv 1 \pmod 5$. In this case, using the form of the general answer you yourself found, we have that $-2s \equiv 0 \pmod 5$, which implies $s=5k$ for some $k \in \mathbb{Z}$. It follows that any solution respecting the modular condition on $a$ is of the form $b = 1-10k$ and $a=-1+35k$ for some $k \in \mathbb{Z}$.
Finally, observe that for any choice of $k$, we have $a \equiv -1 \equiv 4 \pmod 5$ and $b \equiv 1 \pmod 5$, so all of those are solutions. Even $k=0$ ($a=-1, b=1$) is a solution