Hello,
Let's assume the last digit given by the function last(x).
last(7^0)=1
last(7)=7
last(7^2)=last(49)=9
last(7^3)=last(last(7^2)*7)=last(9*7)=last(63)=3
last(7^4)=1
If the exponent n is 0,4,8,12,.... a multiple of 4 last(7^n)=1
If the exponent n is 1,5,9,13,.... a multiple of 4 + 1 last(7^n)=7
If the exponent n is 2,6,10,14,.... a multiple of 4 + 2 last(7^n)=9
If the exponent n is 3,7,11,15,.... a multiple of 4 + 3 last(7^n)=37
Here exponent is 282=70*4+2
last(7^282)=9