I am trying to prove that the restriction functor $\mathbb{r}: {\rm Sh}(X) \to {\rm Sh}(\mathcal{B})$ is an equivalence of categories, and I came across this answer (here you can also find the full statement that I am trying to solve, also here is a question I asked also related to this problem).
However, my question is now a bit different: we wish to prove that $f'$ is a morphism of sheaves (you can see what this means more clearly in the answer I have linked). I did as they hinted and considered a $U' \subseteq U$, $x \in F(U)$, and again a open covering of $U$ by $\{V_i| i\in I\} \subseteq \mathcal{B}$. I have reached thus far: $$ (f'(U)(x){\mid_{U'}}){\mid_{V_i}}=(f'(U')(x{\mid_{U'}})){\mid_{V_i}}=f'(V_i)(x{\mid_{V_i}})=y_i $$
Now, by the injectivity condition part on $G$ (I think, given that we previously found that $y_i{\mid_{U_i \cap U_j}}=y_j{\mid_{U_i \cap U_j}}$), we have that $$ f'(U_i)(x){\mid_{U_i \cap U_j}}= f'(U_j)(x){\mid_{U_i \cap U_j}} $$
If I am wrong please correct me on this.
Is this enough to prove that $f'$ is a morphism of sheaves? And do you have any tips to prove that $\mathbb{r}(f')=f?$
Any help is really, really appreciated! Thanks for taking your time to read my question.