If $23|3x+5y$ for some $x,y\in \mathbb{Z}$, then $23|5x-7y$? Let $x,y$ be some integers such that $23|3x+5y$. Show that $23|5x-7y$ as well.
This was my exam question and I did not solve it. Could anyone give some insight how to do this? Even after the exam I can not solve it...

Divisibility questions are often simpler when rephrased as modular arithmetic. You want to show
$$ 3x + 5y \equiv 0 \pmod{23} \implies 5x - 7y \equiv 0 \pmod{23} $$
A simplistic thing to do is to look at the known equation, and simplify it by solving for $x$
$$ x \equiv 3^{-1} \cdot (-5) y = 6y \pmod{23} $$
and using this to eliminate $x$ from the thing we're trying to prove:
$$ \begin{align} 5x - 7 \equiv 0 \pmod{23} &\iff 5(6y) - 7y \equiv 0 \pmod{23} 
\\&\iff 30y - 7y \equiv 0 \pmod{23}
\\&\iff 0y \equiv 0 \pmod{23}
\end{align}$$
Conveniently, we've accidentally solved the problem in the process of simplifying it!

Another thing to do with it is to use your linear algebra. The set of all solutions for $(x,y)$ in the equation $3x + 5y \equiv 0 \pmod{23}$ is a one-dimensional vector space over the field of 23 elements. Similarly, the set of all solutions to $5x - 7y \equiv 0 \pmod{23}$ is a one-dimensional vector space.
If every solution to the former is truly a solution to the latter, then those have to be the same one-dimensional vector space. And for that to happen, the vectors $(3, 5)$ and $(5, -7)$ must be linearly dependent.
We could try to see that one of these vectors is a multiple of the other one, but it is even easier (no modular division involved!) to check the determinant of the matrix
$$ \left[ \begin{matrix} 3 & 5 \\ 5 & -7 \end{matrix}  \right]$$
is zero. And indeed,
$$3 \cdot (-7) - 5 \cdot 5 = -21 - 25 = -46 \equiv 0 \pmod{23} $$
It is important that $23$ is prime; linear algebra is a bit more subtle if you try to work in the ring of integers modulo a composite number.
