It's simple math.



The good answer is: 6

8×8-8=56,

7×7-7=42,

6×6-6=30,

5×5-5=20,

3×3-3=6.