Let $R$ be a (commutative unitary) ring object in a topos $\mathcal E$. Say $R$ is a Fermat ring if it satisfies $$\forall f:R\to R\;\exists !g:R^2\to R\;: \forall x,x^\prime \in R\;[fx^\prime -fx=g(x,x^\prime )\cdot (x^\prime -x)].$$ As Kock writes in his SDG book, this is an alternative synthetic foundation for calculus.
Suppose now $\mathcal E$ is a topos of $k$-algebras for $k$ a commutative unitary ring. $\mathcal E$ has the ring object $R=\operatorname{Spec}k[x]$. I want to prove that $$\mathcal E\models R\text{ is Fermat}.$$
A chain of isomorphisms quickly reminds me that $f:R\to R$ is just a univariate polynomial with coefficients in $k$. If an arrow $g:R^2\to R$ were just a bivariate polynomial, then it seems we can get a desired $g$ by looking at $f(Y)-f(X)$. Indeed, since $Y-X\mid Y^k-X^k$, then $Y-X\mid f(X)-f(Y)$ and any bivariate polynomial which gives $f(Y)-f(X)$ when multiplied by $Y-X$ should work.
My problem is that I can't seem to get a chain of isomorphisms leading to $k[x,y]$; all I get is
$$\mathsf{Hom}(\operatorname{Spec}k[x]\times \operatorname{Spec}k[x],\operatorname{Spec}k[x])\cong \mathsf{Hom}(k[x],k[x]\times k[x])\cong \mathsf{Hom}(\mathbf{2},Uk[x])$$i.e two univariate polynomials...