We were shown in class this next calculation: (Here, $V_n(RB^n)$ is the volume of an $n$ dimensional ball of radius $R$, likewise $S_{n-1}$ is the surface area of the $n$ dimensional sphere in $\mathbb{R}^n$. $rS^{n-1}$ denotes the $n$ dimensional sphere of radius $r$ and integrating $d\textbf{S}$ means a surface integral.) $V_n(RB^n)=\int_{RB^n}1dx=\int_0^R\int_{rS^{n-1}}1d\textbf{S}dr=\int_0^R\int_{S^{n-1}}r^{n-1}d\textbf{S}dr=$$=\int_0^Rr^{n-1}\int_{S^{n-1}}1d\textbf{S}dr=\int_0^Rr^{n-1}S_{n-1}dr=\frac{R^n}{n}S_{n-1}$ and finally $V_n=\frac{1}{n}S_{n-1}$ since $V_n(RB^n)=R^nV_n$. My problem is with the 3rd equality. The first is obvious and the second is the coarea formula. I assume the third equality is a result of a change of variables, but since this is taking place in $\mathbb{R}^n$ I'd expect the change of variables to be $x\mapsto rx$ which gives the Jacobian of $r^n$ - not the $r^{n-1}$ we see after the third equality.
It'd be easier for me to assume the teacher had a mistake here, had she not used this result later on in her lectures... So my question is, was she wrong in the change of variables there or am I missing something about surface integrals?