If we wanted to fingd the last digit, we would have to go threw the endings of the powers of 7
7^1=7
7^2=9
7^3=3
7^5=1
7^6=7
So from here the cycle repeats every 4.
2017 divided by 4 leaves a remainder of 1, so the last digit is 7.
But the question asks for the last 10 and first 10 digits, and i have no idea how to solve that, I don't think that it is really posible, it would leave a huge number.
Sorry if this post was unhelpful, but I don't think that the solution is possible (I mean, it is possiblr, but, like I said befor, it would end up as a huge number that would be really hard to calculate, and I don't think there are any meathods or short cut). Once agian, sorry,