Solution (source code)

= Solution

A <group scheme> over $k$ is a $k$-scheme $G$ with multiplication $m_G:G\times_kG\to G$, identity $e_G:\operatorname{Spec}k\to G$, and inversion $i_G:G\to G$ satisfying the group axioms as identities of morphisms. A <homomorphism of group schemes> $f:H\to G$ is a $k$-morphism satisfying
$$
f\circ m_H=m_G\circ(f\times f),
$$
and it then preserves the identity and inversion.

Assume $G$ and $H$ are commutative. The group $G(H)=\operatorname{Mor}_k(H,G)$ has pointwise addition
$$
f+g=m_G\circ(f,g).
$$
For every $k$-algebra $R$ and $x,y\in H(R)$,
$$
(f+g)_R(x+y)=f_R(x)+f_R(y)+g_R(x)+g_R(y)=(f+g)_R(x)+(f+g)_R(y),
$$
where commutativity permits the middle terms to be reordered. Hence $f+g$ is a homomorphism. The zero morphism and pointwise inverse are also homomorphisms, so $\operatorname{Hom}_k(H,G)$ is a subgroup of $G(H)$. The definition immediately gives
$$
\boxed{(f+g)_R(x)=f_R(x)+g_R(x).}
$$

Repeated pointwise addition gives $(nf)_R(x)=n f_R(x)$. Since $f_R$ is a group homomorphism,
$$
n f_R(x)=f_R(nx)=([n]_G)_R(f_R(x)).
$$
The <Yoneda lemma> turns equality on all $R$-valued points into equality of morphisms, proving
$$
\boxed{nf=f\circ[n]_H=[n]_G\circ f.}
$$