$n$ is a square and a cube $a^2 = n = b^3\Rightarrow n\equiv 0,1\pmod{7}$ 
Verify that if an integer is simultaneously a square and a cube, then it must be either of the form ${7k}$ or ${7k +1}$.

I have no idea on how to proceed.

Check the integers mod $7$. Which are squares and which are cubes:
$$0^2=0^3=0$$
$$1^2=1^3=1$$
$$2^2 = 4,\qquad 2^3=8\equiv 1$$
$$3^2 = 9 \equiv 2,\quad3^3=27\equiv 6$$
$$4^2 = 16 \equiv 2,\quad 4^3= 64 \equiv 1$$
$$5^2 = 25 \equiv 4,\quad 5^3= 125 \equiv 6$$
$$6^2 = 36 \equiv 1,\quad 6^3=216\equiv 6.$$
So only $0, 1, 2$ and $4$ are squares, only $0, 1$ and $6$ are cubes (mod $7$). The ones that are both give the wanted answer.
