This is Exercise II.2 of Mac Lane and Moerdijk's, "Sheaves in Geometry and Logic [. . .]".
The Details:
Adapted from Adámek et al.'s, "Abstract and Concrete Categories: The Joy of Cats", p. 48 . . .
Definition 1: A full subcategory $\mathbf{A}$ of a category $\mathbf{B}$ if $\mathbf{A}$ is a subcategory of $\mathbf{B}$ such that for all $A, A'\in{\rm Ob}(\mathbf{A})$, we have $${\rm Hom}_{\mathbf{A}}(A, A')={\rm Hom}_{\mathbf{B}}(A, A').$$
From Mac Lane and Moerdijk, p. 37
Definition 2: Given an object $C$ in the category $\mathbf{C}$, a sieve on $C$ [. . .] is a set $S$ of arrows with codomain $C$ such that
$f \in S$ and the composite $fh$ is defined implies $fh \in S$.
Let $X$ be a topological space with $\mathcal{O}(X)$ its set of open sets.
Adapted from p. 25, ibid. . . .
Definition 3: Let $\mathbf{C}$ be a category. Then $\hat{\mathbf{C}}=\mathbf{Sets}^{\mathbf{C}^{{\rm op}}}$ is the category of presheaves of $\mathbf{C}$.
On p. 66, ibid. . . .
Definition 4: A sheaf of sets $F$ on a topological space $X$ is a functor $F:\mathcal{O}(X)^{{\rm op}}\to\mathbf{Sets}$ such that each open covering $U=\bigcup_iU_i, i\in I$, of open subsets of $U$ of $X$ yields an equaliser diagram
$$ FU\stackrel{e}{\dashrightarrow}\prod_{i\in I}FU_i\overset{p}{\underset{q}{\rightrightarrows}}\prod_{i,j\in I}(U_i\cap U_j),$$
where for $t\in FU,$ $e(t)=\{ t\rvert_{U_i}\mid i\in I\}$ and for a family $t_i\in FU_i$,
$$p\{ t_i\}=\{t_i\rvert_{(U_i\cap U_j)}\}\quad\text{ and }\quad q\{ t_i\}=\{t_j\rvert_{(U_i\cap U_j)}\}.$$
From p. 70 ibid. . . .
A sieve $S$ on $U$ is said to be a covering sieve for $U$ when $U$ is the union of all the open sets $V$ in $S$.
The definition of a limit can be found on page 21 ibid. It is standard and quite lengthy, so I will omit it here.
The Question:
Exercise II.2: A sieve $S$ on $U$ in $\mathcal{O}(X)$ may be regarded as a full subcategory of $\mathcal{O}(X)$. Prove that a presheaf $P$ on $X$ is a sheaf iff for every covering sieve $S$ on an open set $U$ of $X$ one has $$PU = {\lim_{\longleftarrow}}_{V\in S}PV.\tag{1}$$
Thoughts:
Let $P:\mathcal{O}(X)^{{\rm op}}\to\mathbf{Sets}$ be a presheaf.
$(\Rightarrow)$ Suppose $P$ is a sheaf. Let $S$ be a covering sieve of an open set $U$ of $X$.
I'm not sure what to do.
I think one has to make use of the statement about the full subcategory of $\mathcal{O}(X)$ in the sense that the uniqueness of the limit on the RHS of $(1)$ is taken to be that of the LHS by consideration of the ${\rm Hom}$-sets of $S$ and $\mathcal{O}(X)$. This idea is not fully fledged in my mind though. Does it even make sense?
$(\Leftarrow)$ I'm at a loss here.
Further Context:
To give you a rough idea of my abilities, consider the following questions of mine:
I am studying topos theory recreationally.
Please help :)