Line integrals, cross products, surface integrals and Stoke's Theorem related problem? The vector field $\vec{F}(\vec{R})$ is defined as being equal to the line integral over some simple closed curve $C$: 
$$\vec{F}(\vec{R})=\oint_C\|\vec{r}-\vec{R}\|^2d\vec{r}.$$
We show that there are constant vectors $\vec A$ and $\vec B$ such that
$$\vec{F}(\vec{R})=\vec{A}\times\vec{R}+\vec{B}.$$
I don't know how to handle this part of the question at all, I've tried writing this in more explicit ways but it still seems really obscure to me. Can you help me?
Then we deduce that 
$$\nabla\times\vec{R}=-4\iint_S d\vec{S},$$
where $S$ is any smooth surface with boundary $C$.
I guess this is related to Stoke's Theorem but I'm not very sure I see the proper way of doing this... Any kind of hint for this second part would be amazing!
Thank you.

Let $\vec{a}$ be arbitrary constant vector; $S$ a smooth surface with $\partial S = C$; and, for ease of notation, let $\phi = \|\vec{r} - \vec{R}\|^2$. 
Then
$\begin{eqnarray*}
\vec{a} \cdot \displaystyle\oint_C\phi d\vec{r} &=& \displaystyle\oint_C\phi\vec{a}\cdot d\vec{r}\\
&=& \displaystyle\iint _S\nabla \times (\phi\vec{a})\cdot d\vec{S} \ \text{(By Stokes')}\\
&=& \displaystyle\iint_S \left(\phi\underbrace{\nabla \times \vec{a}}_{=\ 0} +\nabla\phi \times \vec{a}\right)\cdot d\vec{S}\\
&=&\vec{a}\cdot \displaystyle\iint_S-\nabla \phi \times d\vec{S} \ \text{(By cyclic permutation of the scalar triple product)}
\end{eqnarray*}$
Hence
$\begin{eqnarray*}
\vec{F}(\vec{R}) &=& - \displaystyle\iint_S \nabla\left(\|\vec{r}-\vec{R}\|^2\right)\times d\vec{S}\\
&=& -2\displaystyle\iint_S\left(\vec{r}-\vec{R}\right) \times d\vec{S} \\ 
&=& \left(-2\displaystyle\iint_S d\vec{S}\right) \times \vec{R} + \left(-2\displaystyle\iint_S\vec{r}\times d\vec{S}\right)\\
&=&\vec{A}\times \vec{R} + \vec{B}
\end{eqnarray*}$
Where $\vec{A}$ and $\vec{B}$ are suitable constant vectors, as desired.
