Why is Weil restriction right adjoint to base change? Let $k'/k$ be a finite field extension, and let $X'$ be an affine group scheme over $k'$.  We can define the Weil restriction of $X'$ to be the affine group scheme $\mathrm{Res}_{k'/k}(X')$ over $k$ whose $A$-valued points are given by:
$$\mathrm{Res}_{k'/k}(X')(A)=X'(A\otimes_kk')$$
where $A$ is any commutative $k$-algebra.  Here we view affine group schemes as representable functors from commutative algebras to groups.
I'd like to see why Weil restriction is right adjoint to base change, that is, why we have a natural correspondence:
$$\mathrm{Hom}_{\text{aff. gp. sch./k}}(X,\mathrm{Res}_{k'/k}(X'))\cong\mathrm{Hom}_{\text{aff. gp. sch./k'}}(X\times_kk',X')$$
My idea: in my experience, adjoint functors usually arise from some universal property, which would mean I would need some sort of natural map between $\mathrm{Res}_{k'/k}(X')$ and $X'$, but these objects aren't even in the same category, so this suggestion could be nonsense.  I don't have very good intuition here.  Any help is appreciated.
 A: Note that the functorial definition of the Weil restriction is really easy, but one has to show that the functor is representable and therefore is really an affine group scheme (not just a group functor). But this is not really necessary to understand the adjunction, because it holds for arbitrary functors and arbitrary adjunctions (I'm too lazy to write down the precise statement; my point is just that we really have something completely formal here). Let us recall the definitions:


*

*A morphism $X \to \mathrm{Res}(X')$ is a bunch of maps $X(A) \to X'(A \otimes_k k')$ for every $k$-algebra $A$, which are natural in $A$.

*A morphism $X  \times_k k' \to X'$ is a bunch of maps $X(B|_k) \to X'(B)$ for every $k'$-algebra $B$, which are natural in $B$. Here, $B|_k$ denotes the $k$-algebra given by restricting scalars.
The correspondence is given as follows:


*

*Given $X \to \mathrm{Res}(X')$, we define $X(B|_k) \to X'(B|_k \otimes_k k') \to X'(B)$, using the natural map of $k'$-algebras $B|_k \otimes_k k' \to B$ (counit). This defines $X \times_k k' \to X'$.

*Given $X \times_k k' \to X'$, we define $X(A) \to X((A \otimes_k k')  |_k) \to X'(A \otimes_k k')$ using the natural map $A \to (A \otimes_k k')|_k$ (unit) of $k$-algebras. This defines $X \to \mathrm{Res}(X')$.
