Note that an equality condition is possible. Condider $n$ even. Let half of the $x_i$ equal to $a$ and let the corresponding $y_i$ equal to $b$. For the other half of the variables, exchange $a$ and $b$. Then the condition $x_1^2+x_2^2+\ldots+x_n^2=y_1^2+y_2^2+\ldots+y_n^2 = \frac{n}2 (a^2 + b^2)$ holds. Inserting in the inequality, indeed we have
$$
\frac{n}2 (\frac{a^3}{b} + \frac{b^3}{a}) = \frac {x_1^3}{y_1}+\frac {x_2^3}{y_3}+\ldots+\frac {x_n^3}{y_n} = \frac {a^4+b^4}{ab (a^2+b^2)}(x_1^2+x_2^2+\ldots+x_n^2) = \frac {a^4+b^4}{ab (a^2+b^2)} \frac{n}2 (a^2 + b^2)
$$
with equality.
Now let us show that this constellation is extremal.
Let $q_i = \frac{x_i}{y_i}$. Choose a set of $x_i$. W.l.o.g., order the $x_i^2$ in ascending order. We have for $s$, the sum of squares: $n a^2 \leq s = x_1^2+x_2^2+\ldots+x_n^2 =y_1^2+y_2^2+\ldots+y_n^2 \leq n b^2$
The inequality is
$$
(x_1^2 q_1+x_2^2 q_2+\ldots+x_n^2 q_n) \leq \frac {a^4+b^4}{ab (a^2+b^2)}(x_1^2+x_2^2+\ldots+x_n^2)
$$
Now we argue for some extremal set of $y_i$.
By the rearrangement inequality, the maximum value of the LHS is obtained if the highest factors $q_i$ are chosen for the highest $x_i^2$. This can be achieved by letting as many $y_i = a$ for the highest indices $i$. The number $k$ of these settings $y_i = a$ is limited by $s =y_1^2+y_2^2+\ldots+y_{n-k}^2 + k a^2$. The number $k$ can be made as large as possible if all of the previous $y_1 = \ldots = y_{n-k} = b$. Then we have $s =(n-k) b^2 + k a^2$. This is $k = \frac{nb^2 -s}{b^2 - a^2}$ or the nearest possible smaller integer. So we have to show
$$
\frac {x_1^3}{y_1}+\frac {x_2^3}{y_3}+\ldots+\frac {x_n^3}{y_n} \leq \frac {x_1^3}{b}+\frac {x_2^3}{b}+\ldots+ \frac {x_{n-k}^3}{b} + \frac {x_{n-k+1}^3}{a} + \ldots + \frac {x_n^3}{a} \leq \frac {a^4+b^4}{ab (a^2+b^2)}(x_1^2+x_2^2+\ldots+x_n^2)
$$
or
$$
\frac{\frac {x_1^3}{b}+\frac {x_2^3}{b}+\ldots+ \frac {x_{n-k}^3}{b} + \frac {x_{n-k+1}^3}{a} + \ldots + \frac {x_n^3}{a}}{x_1^2+x_2^2+\ldots+x_n^2} \leq \frac {a^4+b^4}{ab (a^2+b^2)}
$$
Now again, for the LHS the maximum value has to be found by considering settings of the $x_i$. This maximal setting of the $x_i$ is obtained if most of the $x_i$ with high indices $i$ are chosen as high as possible, i.e. $x_i=b$. With the same argument as already given, this is possible for $n-k$ many $b$. This gives that we have to show (for $k \leq n/2$):
$$
\frac{\frac {x_1^3}{b}+\frac {x_2^3}{b}+\ldots+ \frac {x_{n-k}^3}{b} + \frac {x_{n-k+1}^3}{a} + \ldots + \frac {x_n^3}{a}}{x_1^2+x_2^2+\ldots+x_n^2} \leq
\frac{k \frac {a^3}{b}+ (n - 2k)\frac {b^3}{b}+ k \frac {b^3}{a} }{(n-k) b^2 + k a^2} \leq
\frac {a^4+b^4}{ab (a^2+b^2)}
$$
Now in the LHS, we have that
$$
\frac{k \frac {a^3}{b}+ (n - 2k)\frac {b^3}{b}+ k \frac {b^3}{a} }{(n-k) b^2 + k a^2}
$$
is $1$ for $k=0$ and maximal for $k = n/2$ where we have
$$
\frac{k \frac {a^3}{b}+ (n - 2k)\frac {b^3}{b}+ k \frac {b^3}{a} }{(n-k) b^2 + k a^2} \quad {{(k = n/2)}\atop {=}} \quad
\frac {a^4+b^4}{ab (a^2+b^2)}
$$
The same method can be applied for $k \geq n/2$ where again the LHS is $1$ for $k=n$.
For odd $n$ we have to take extra care of the central term with $i = (n+1)/2$.
This proves the claim.