Yes, that is correct, though I would break that step into two: first replace the variable, and then bring out the quantifier. So:
$(\forall u) ((\exists x) S(x,y) \rightarrow (R(x) \rightarrow \
eg S(x,u))) \overset{\text{Replace variables}}\Leftrightarrow$
$(\forall u) ((\exists w) S(w,y) \rightarrow (R(x) \rightarrow \
eg S(x,y)))\overset{\text{Prenex Law}}\Leftrightarrow$
$(\forall u) (\forall w) (S(w,y) \rightarrow (R(x) \rightarrow \
eg S(x,y)))$