While it seems like you've resolved your particular issue, this might be a good opportunity to think about how operations work more generally, as you will come to see a lot of operator algebra in quantum mechanics.
Taking your first equation and substituting $R(r) \rightarrow u(r)/r$ and dividing by $Y(\theta,\varphi)$, we get
\begin{equation}
\left[ -\frac{\hbar}{2m} \left( \frac{1}{r} \frac{d^2}{dr^2} r - \frac{l(l+1)}{r^2} \right)
+ V(r) \right]\frac{u(r)}{r} =
E \frac{u(r)}{r}.
\end{equation}
Someone who is used to regular (scalar) algebra might be tempted to simply cancel the $1/r$ factors multiplying $u(r)$ on both sides. This would be fine if not for a certain term on the left-hand side;
\begin{equation} \tag{1} \label{term}
-\frac{\hbar}{2m} \left( \frac{1}{r} \frac{d^2}{dr^2} r \right)\frac{u(r)}{r}.
\end{equation}
There are two important reasons why we can't just multiply this term by $r$ to get rid of the $r$ dividing $u(r)$.
- Operators are applied from the left, by convention.
- The differential operator $d/dr$ does not commute with multiplication by a factor which involves $r$;
\begin{equation}
\frac{d}{dr}f(r) \neq f(r)\frac{d}{dr}.
\end{equation}
With this in mind, if we multiply (\ref{term}) by $r$ we should do so from the left (you can think of it as applying a multiplication operator), which cancels the $1/r$ factor there (scalar multiplications do, of course, commute). The remaining part then tells us to first multiply $u(r)/r$ by $r$ and then differentiate the result twice with respect to $r$, which is why we get
\begin{equation}
-\frac{\hbar}{2m}\frac{d^2u}{dr^2}.
\end{equation}