Determine the value of mmm such that the remainder of (x3+mx2−3x+5)÷(x+2)(x^3 + mx^2 - 3x + 5) \div (x + 2)(x3+mx2−3x+5)÷(x+2) is 777.
m = 1
m = 2
m = 3
m = 4