It really goes about the cyclic structure of 7^n and 3^n.
You see,
7^1 ends with 7
7^2 ends with 9
7^3 ends with 3
7^4 ends with 1
7^5 ends with 7 again ( which points to the beginning of the cycle and it goes on and on)
.
.
.
So we can infer that 7^28 ends with 1 (because 28 is a multiple of 4)
Similarly,
3^1 ends with 3
3^2 ends with 9
3^3 ends with 7
3^4 ends with 1
3^5 ends with 3 ( which points to the beginning of the cycle)
.
.
.
So we can infer than 3^25 will end with 3 => 3^23 ends with 7
Since, 177^28 is obviously bigger, the difference will be 11 - 7 = 4 ( The 1 being obviously borrowed from the ten's digit place )
Good question