\(\large{\frac{3r^3}{2r} \\~\\ =\frac{3\,\cdot\, r\,\cdot\, r\,\cdot\, r}{2\,\cdot\, r}}\)
We can reduce the numerator and denominator by r ...(....and say r ≠ 0 ) .
\(\large{=\frac{3\,\cdot\, r\,\cdot\, r}{2} \\~\\ =\frac{3r^2}{2}}\)
Which is what you had !! 