In a topos $\mathcal E$, let $S\rightarrowtail R$. Given an arrow $f:X\to R$, we can form the "external" pullback square below. $$\require{AMScd} \begin{CD} f^{-1} S @>>> S \\ @VVV @VVV\\ X @>>{f}> R \end{CD}$$
On the other hand, we can "internalize" and view $f$ instead as $f\in X^R$. Then we may look at $[[x\in X\mid f(x)\in S]]$.
Are these the same? In other words, is it true that $f^{-1} S=[[x\in X\mid f(x)\in S]]$?
From the comments and answer to this MSE question, I think the answer is yes, but then an article I'm reading makes no sense to me: from what I understand it makes a point of distinguishing between the following two definitions.
Definition 1. Given any $X$ in $\mathcal E$, define $\mathcal S(X)\subset \Omega ^X$ by the following formula. $$\text{for }U\in \Omega ^X,\;U\in\mathcal S(X)\iff \exists f\in R^X (U=[[x\in X\mid f(x)\in S]])$$ (The author refers to these as internal pullbacks)
Definition 2. Given any $X$ in $\mathcal E$, define $\mathsf{Ext}\mathcal S(X)\rightarrowtail \Gamma(\Omega ^X)$ by the following formula. $$\text{for }U\rightarrowtail X,\;U\in\mathsf{Ext}\mathcal S(X)\iff \exists f:X\to R \;(U=f^{-1}S)$$ (The author refers to these as external pullbacks)
What's going on here? What is the relation between $\Gamma(\mathcal S(X))$ and $\mathsf{Ext}\mathcal S(X)$?
Yes they are the same.
For the second part of the question I would need to look at the paper you are trying to read to be sure, but I think the difference between the two is in the meaning of the existential quantification $\exists$ one is internal while the other is external.
In the first $\exists f \in R^X$ have to be interpreted following the Kripke-Joyal semantics (i.e. the internal logic) because $R^X$ is an object of the topos so there is no possible ambiguity. The second "$\exists f : X \rightarrow R$ can be interpreted both in term of the internal logic or in term of classical existential quantification. In the first case there would be essentially no difference between the two definition (except that the first is an object of the topos and the second is its set of globale section) so I'm tented to assume that $\exists f:X \rightarrow R$ should be interpreted as a classical existential quantification and not an internal one, which makes potentially a big difference between the two.
For example in the topos of $G$-set $X^R$ is the set of all functions from $X$ to $R$ with the action of $G$ by conjugation. Hence the existential quantification just ask for the existence of a function $f$ not neccearily $G$ equivariant, while the second ask definition ask that there exists $G$ equivariant $f$.
In a topos of sheaf, the first definition ask that $f$ exists locally while the second ask that there is a globally defined $f$.
Also the first definition define an object of the topos (a subobject of $\Omega^{X}$) while the second definition can only define a subset of global section, i.e. a subset of $Sub(X)$. The second definition give a subset set of the set of globale section of the first.