I won't give the right answers here. If you want to know the right answers, come to see me.
12.1.05. You can reach the right answer by using the form of Fermat's Little Theorem given on Page 200. But it'll save you quite some time by using another form, namely, x^{p-1}\cong 1 (mod p).
12.8.08. To get the full credit, you have to show the complexity of both algorithms.
12.4.09. Find your self a large-integer package to calculate the exact number. See T7 remkars, e.g.