Real numbers $x$ and $y$ have an arithmetic mean of $18$ and a geometric mean of $\sqrt{47}$. Find $x^2+y^2$.

Since $x$ and $y$ have an arithmetic mean of $18$, we have that $\frac{x+y}{2} = 18$. From this, we can represent $y$ in terms of $x$ as $y = 36-x$.

Since $\sqrt{47}$ is the geometric mean of $x$ and $y$, we know that $\sqrt{47} = \sqrt{xy} = \sqrt{x(36-x)}$.
Squaring both sides to eliminate the square root sign gives us
$47 = x(36-x)$
This is a quadratic equation, which simplifies to $x^2-36x+47 = 0$.
Factor the quadratic to get $(x-23)(x-2) = 0$
This gives us $x=23$ or $x = 2$
If $x=23$, then $y=36-23 = 13$. If $x=2$, then $y=36-2=34$. This gives us two pairs $(x,y)$ that satisfy the given conditions:

$(23,13)$
$(2,34)$

Finally, the problem asks for the sum of the squares of $x$ and $y$.
$(23^2 + 13^2) = (23+13)(23-13) = (36)(10) = \boxed{360}$
and
$(2^2 + 34^2) = (2+34)(34-2) = (36)(32) = \boxed{1152}$.
Notice that the sums of the squares of $x$ and $y$ for both pairs are actually \textbf{both} equal to the same quantity, $(x+y)^2$.

Let's start by solving for $x$ and $y$ using the information given.

We can use the formulas for arithmetic and geometric means to set up two equations:

Arithmetic mean: $\frac{x+y}{2} = 18$

Geometric mean: $\sqrt{xy} = \sqrt{47}$

To solve for $x$ and $y$, we can solve these equations simultaneously.

First, let's solve the arithmetic mean equation for $x+y$:

$x+y = 2 \cdot 18 = 36$

Now let's solve the geometric mean equation for $xy$:

$xy = (\sqrt{47})^2 = 47$

We now have a system of equations:

$x+y = 36$

$xy = 47$

We can solve this system by substitution or using a quadratic equation. Let's use substitution:

Solve the first equation for $x$:

$x = 36 - y$

Substitute this expression for $x$ into the second equation:

$(36 - y)y = 47$

Expanding and rearranging the equation, we get:

$36y - y^2 = 47$

Rearrange the equation:

$y^2 - 36y + 47 = 0$

This is a quadratic equation, and we can solve it using the quadratic formula:

$y = \frac{-(-36) \pm \sqrt{(-36)^2 - 4(1)(47)}}{2(1)}$

Simplifying,

$y = \frac{36 \pm \sqrt{1296 - 188}}{2}$

$y = \frac{36 \pm \sqrt{1108}}{2}$

$y = \frac{36 \pm 2\sqrt{277}}{2}$

$y = 18 \pm \sqrt{277}$

Therefore, the possible values for $y$ are $18 + \sqrt{277}$ and $18 - \sqrt{277}$.

Using the expression for $x$ we found earlier ($x = 36 - y$), we can find the corresponding values for $x$:

If $y = 18 + \sqrt{277}$, then $x = 36 - (18 + \sqrt{277}) = 18 - \sqrt{277}$

If $y = 18 - \sqrt{277}$, then $x = 36 - (18 - \sqrt{277}) = 18 + \sqrt{277}$

So, the possible pairs of $x$ and $y$ are:

$(x,y) = (18 - \sqrt{277}, 18 + \sqrt{277})$

$(x,y) = (18 + \sqrt{277}, 18 - \sqrt{277})$

Finally, we can find $x^2 + y^2$ for each pair:

For the first pair:

$(18 - \sqrt{277})^2 + (18 + \sqrt{277})^2 = 1296$

For the second pair:

$(18 + \sqrt{277})^2 + (18 - \sqrt{277})^2 = 1296$

So, $x^2 + y^2 = \boxed{1296}$.