Equivalence of two definitions of local functors
Solution 1:
There is a size issue when talking about $\mathrm{Mor}(Y,X).$ To make a meaningful answer I'll assume, without mentioning it again, that $X,Y$ are defined relative to a fixed Grothendieck universe $U.$
There are two things going on here:
- The distinguished opens $A_x$ are a base for the Zariski topology, so the sheaf condition for $A$ can be checked on covers by distinguished opens
- It suffices to check the sheaf condition for affine $Y$
For 1, consider an arbitrary cover of $Y=h_A$ by open subfunctors. This means a collection of open subfunctors $h_{A,I}(B)=\{f\in \hom(A, B)\mid f(I)B=B\}$ for $I\in\mathcal I,$ such that that the ideals $I\in\mathcal I$ generate $B.$ There is a finite sum $\sum a_ib_i=1$ with each $a_i\in I_i\in\mathcal I,$ and hence $\{h_{A,(a_i)}\}$ covers $Y.$ When the sheaf condition holds for the original cover, it holds for the refined cover, so your second condition implies your first condition restricted to affine $Y.$
For 2, given $\phi_i:Y_i\to X$ satisfying the sheaf condition, we want to show there is a unique extension to $\phi:Y\to X.$ Fix an algebra $A$ and a map $h_A\to Y.$ By definition of $Y_i,$ the pullbacks $A_i=Y_i\times_Y h_A$ are an open cover of $h_A.$ We have a composed map $A_i\to Y_i\to X$ satisfying the sheaf condition which, by your second condition and my point 1 above, glues to a unique $h_A\to X.$ Since the map $h_A\to Y$ was arbitrary, by Yoneda's lemma this process defines a function $Y(A)\to X(A)$ for each algebra $A.$ To show this is natural we need to check for each $f:h_B\to h_A$ that the following diagram commutes. $\require{AMScd}$ $$ \begin{CD} Y(A) @>Y(f)>> Y(B) \\ @V\phi_AVV @V\phi_BVV \\ X(A) @>X(f)>> X(B) \end{CD}$$
Defining $B_i=Y_i\times_Y h_B,$ precomposition with $B_i\xrightarrow{Y_i\times f} A_i$ and postcomposition by $Y_i\xrightarrow{\phi_i} X$ in either order gives a commuting diagram $$ \begin{CD} \mathrm{Mor}(A_i,Y_i) @>>> \mathrm{Mor}(B_i,Y_i) \\ @VVV @VVV \\ \mathrm{Mor}(A_i,X) @>>> \mathrm{Mor}(B_i,X) \\ \end{CD}$$
Each element of $Y(A)$ pulls back to an element of $\mathrm{Mor}(A_i,Y_i),$ which ends up as the same element of $\mathrm{Mor}(B_i,X)$ going either way round the diagram. By the sheaf condition for the cover $\{B_i\to h_B\},$ these glue to a unique element of $X(B).$ This proves that $\phi$ is a natural transformation.