The regular representation for affine group schemes

The definition that Milne uses for a representation on $V$ is that it is a natural transformation of functors $$G \to \operatorname{End}(V)$$ such that the components $$G(R) \to \operatorname{End}_R(V \otimes_k R)$$ are homomorphisms. If $V = k[G]$ is the coordinate ring of a scheme then $V \otimes_k R = k[G] \otimes_k R = R[G]$ is the coordinate ring of the scheme $G_R$ obtained by restricting $G$ to $R$-algebras.

For you this means that the function $gf$ will lie in $R[G] = \operatorname{Nat}(G_R, \mathbb A^1_R)$, so in particular you only have to define it's value on elements $x \in G(A)$ where $A$ is an $R$-algebra.

To do this note that being an $R$-algebra means there is a ring homomorphism $R \to A$. Then $G$ being a functor we get a homomorphism $G(R) \to G(A)$ so we can push $g$ into $G(A)$ in order to multiply it with $x$. Then apply $f_A$ to the result.