The proof to both of these relies on INDUCTION.
The basic idea behind induction is the following:
1) Prove that a statement P(n) is true for n=1.
2) Prove that if P(n) is true, then P(n+1) is true, so long as n is at least 1.
If we can prove the above two statements, then we have proven P(n) is true for any n that is at least 1. This is because P(1) is true, so P(2) is true, so P(3) is true, so P(4) is true... and so on.
Now, here's how we prove your first problem:
"P(n)" means "n^2 - 1 is divisible by 8".
P(1) is obviously true, as n^2 - 1 = 0, which is divisible by 8.
Now, suppose for some odd n, P(n) is true. (i.e., n^2 - 1 is divisible by 8). We want to prove that this implies that P(n+2) is true.
"P(n+2)" means "(n+2)^2 - 1 is divisible by 8", which means "n^2 + 4n + 4 - 1 is divisible by 8" which means "(n^2 - 1) + (4n + 4) is divisible by 8".
But this is also clearly true! We know n^2 - 1 is divisible by 8 by assumption. We also know that 4n + 4 is divisible by 8 for any odd n. Thus the whole thing is divisible by 8.
By induction we are done.
Now, you try the second problem.