My attempt so far is that if $d\mid a$ and $d\mid b$ then $a=dx$ and $b=dy$ for some integers $x$ and $y$. Then squaring both $a$ and $b$ and taking there difference I get $a^2-b^2=d(dx^2-dy^2)$ so $(a+b)(a-b)=d(dx^2-dy^2)$
So I know that $d\mid(a+b)(a-b)$ which I'm not sure if I can use that again to help get to the end or if this was the wrong approach.