What is the remainder when is divided by
Not sure if this is what the question designer intended, but I'll assume x > 1, then gcd(x-1, x+1) is either 1 or 2 depending on whether x is even or odd, respectively. If gcd is 1, you can use Euler's theorem to reduce the exponent. If gcd is 2, you can use Chinese remainder theorem along with Euler's theorem to solve by letting (x-1)^4 = 2^m*y where y is odd.