I have some problems with the following task:
Find digits x and y such that the number $\overline{25xy5}$ is divisible by 3 and 7.
So far, I have come up with this solution:
$$ \begin{cases} 2+5+x+y+5=3p,\ p \in\mathbb{Z+} \\ 25xy-10=7q, \ q \in\mathbb{Z+} \end{cases} $$
$$ \begin{cases} 2+5+x+y+5=3p,\ p \in\mathbb{Z+} \\ 2500+10x+y-10=7q, \ q \in\mathbb{Z+} \end{cases} $$
$$ \begin{cases} x+y=3p-12,\ p \in\mathbb{Z+} \\ 10x+y=7q-2490, \ q \in\mathbb{Z+} \end{cases} $$
And the problem is that I don't know if I am on the right way to the solution and what to do with the parameters p and q.