$\!\begin{align}{\rm Hint}\!\!:\
\bmod x^2+1\!:\,\ \color{#c00}{x^2\equiv -1}\ \Rightarrow\ & \overbrace{f_0(\color{#c00}{x^2})\, +\, f_1(\color{#c00}{x^2})\,x}^{\large \text{even + odd part}\!\!\!\!\!\!}\\[.3em]
\equiv\:\!\ & f_0(\color{#c00}{-1}) + f_1(\color{#c00}{-1})\, x\end{align}$
e.g. if $\,x = 10\,$ we get the standard divisibility test by $101$ via the alternating digit sum in radix $100\,$ (the radix $100$ analog of the divisibility by $11$ test in radix $10)$.
Remark $ $ To understand how the answers are related note that it is easy to prove the equivalence below (either directly by the division algorithm, or using $\,\Bbb Q[x]/(x^2+1)\cong \Bbb Q[i],\ i^2=-1);\,$ said simply: the (ring) arithmetic of polynomials mod $\,x^2+1\,$ with coef's $\in\Bbb Q$ is algebraically the same as the arithmetic of complex numbers of the form $\,a+b\,i,\,$ for $\,a,b\in\Bbb Q,\,$ since
$$f(x)\equiv a+b\,x \!\!\!\pmod {\!x^2+1}\iff f(i) = a + b\,i$$
CRT or Lagrange interpolation yields a closed form (cf. first congruence above)
$$f(x) \,\equiv\, \dfrac{f(i)+f(-i)}2 + \dfrac{f(i)-f(-i)}{2i}\,x\ \ \!\!\!\!\pmod{\!x^2+1}$$
Note that the above is the same result that "lone student" derived by evaluating $\,f(x)\,$ at $\,x = \pm i\,$ then solving the resulting system of equations for $\,a,b.\,$ So such evaluation (and interpolation) methods are special cases of CRT = Chinese Remainder Theorem (when the moduli are linear polynomials $\,x-a,\,$ so congruence boils down to evaluation $\,f(x)\equiv f(a)\pmod{x-a}\,$ by the Polynomial Remainder Theorem..
These methods often come in handy for computations, e.g. here where I show how to use them in a (quadratic) nonlinear generalization of the Heaviside cover-up method for computing partial fraction expansions with quadratic denominators.