At first, I tried to proof by contradiction: I considered two numbers that are not divisible by $3$. Than I tried to write consecutive perfect squares that are divisible by $3$ to see some pastern, but it didn't get me anywhere. Then i tried to make express each whole number a,b and c under the condition that $a^2+b^2=c^2$ in terms of two arbitrary integers. I found out that $a$ has to be of the form $2mn$ and $b$ has to be of the form $m^2-n^2$, where $m$ and $n$ are whole numbers. So that I have to prove that either $2mn$ or $m^2-n^2$ is divisible by $3$. I got stuck at this point and don't know how to prove that, so help me please
Your first strategy will turn out to be the more effective one.
Obviously, if a number is divisible by 3, then its square will be as well. Otherwise, the number is of the form $3k\pm1$ for some integer $k$, and $$(3k\pm1)^2=9k^2\pm6k+1\equiv1\pmod3$$
Therefore, the square of a number is either divisible by 3 or it leaves a remainder of 1.
Now, let us consider that there are positive integers $a,b,c$ such that $a^2+b^2=c^2$. From our earlier notion, it cannot be that neither $a$ nor $b$ are multiples of 3, because then their sum would be of the form $3k+2$ and could not be a perfect square. Therefore, either $a$ or $b$ (or both) are divisible by 3.