Not HM, simply self teaching.
Source : Alain Troesch (Louis-le-Grand High School, Paris) , Exercices $2022-2023$, Polycopié des exercices , page $99$, Ex. $21.10$ http://alain.troesch.free.fr/
Given ( by hypothesis) that $7 | a^2 + b^2$ with $a, b \in \mathbb Z$. Prove that $ 7$ divides both $a$ and $b$.
I only manage to prove the implication $ 7|a \implies 7|b^2$ but not $ 7|a \implies 7|b$ , even less the desired conjunction.
Proof of the implication :
Since $7 | a^2 + b^2$ , it follows that: $ a^2 + b^2 = 7k , k \in \mathbb Z$.
Now suppose that $7|a$ meaning equivalently that : $ a = 7k'$.
In that case we have :
$(7k')^2 + b^2 = 7k$
$\iff 7^2(k')^2 + b^2 = 7k $
$\iff b^2 = 7[ k -7(k')^2]$
$ \iff 7 | b^2 $

One of the properties of primes is that
This follows from the fundamental theorem of arithmetic.
Now since $7\mid b\cdot b$ then either $7\mid b$ or $7\mid b$. So $7\mid b$.
Notice that you have only proven that if $7\mid a$ then $7\mid b$. The case still remains where $7\not\mid a,b$. You can now write:
Then after some algebra $$\begin{align}a^2+b^2&=(7m+x)^2+(7n+y)^2\\&=x^2+y^2+7(7m^2+7n^2+2mx+2my)\end{align}$$
Can you take it from here?