If n gives a remainder of 3 when divided by 7, then what remainder does n^2+1 give when divided by 7?
Why don't you try it out?
Pick any number with a remainder of 3, compute \(n^2 + 1\), and find the remainder when it is divided by 7.