$$\begin{align}w&=u^3-uv^2,u=xy,v=u+x\\1)\quad\frac{\partial w}{\partial u}&=3u^2-v^2-2uv\cdot\frac{\partial v}{\partial u}\\2)\quad\frac{\partial v}{\partial u}&=1+\frac{\partial x}{\partial u}\\3)\quad\frac{\partial x}{\partial u}&=\frac{1}{y},\text{ since }x=\frac{u}{y}\end{align}\\\therefore\frac{\partial w}{\partial u}=3u^2-v^2-2uv\cdot(1+\frac{1}{y})$$
$1)$ Is true by the chain rule and the product rule of differentiation: $\partial/\partial u[uv^2]=v^2\cdot\partial/\partial u[u]+u\cdot\partial/\partial u[v^2]\text{ (product rule) }=v^2+2uv\cdot\partial/\partial u[v]\text{ (chain rule). }$
When the variables are independent of each other, their partial derivatives with respect to one another are zero. For example, let $z=6x^2+y^2$ and $x,y$ have no relation to one another. Then, doing things the long way round as I have done in $1),2)$ and $3)$, $\partial/\partial x[z]=12x+2y\cdot\partial/\partial x[y]=12x+2y\cdot0=12x,$ which is the answer you'd expect from independent variables $x,y$, crucially because $\partial/\partial x[y]=0$ since they are not related to one another. It is only when there is a relationship between them that these are non-zero: we cannot let $x$ vary and hold $y$ constant for the purposes of differentiation if $y$ changes as $x$ varies!
In your in-class example, initially $x,y$ had zero relationship between them, and so the differentiation was trivial. However the reason $\partial f/\partial x$ appeared to be both $2$ and $1$ at the same time after you'd introduced $u$ is because you gave $y$ a structure, a relationship that was in common with $x$, because $x=u,y=u+v$ means $y=x+v$, so things are more complicated. Things would be a whole lot better if we used explicit function notation... e.g. $x(u)=u,y(u)=u+v$ in the second half of the example, showing that $x,y$ both depend on the same variable, $u$, but initially $x,y$ were not functions of anything and depended on nothing.
If you can write everything as a simple function of one variable, do so!
More intuition for the last example: changing variables to the new $u,v$ would be like a change of coordinates on the graph: all the same points are reached, but with new axes and a new relationship between the function and those axes... so $\partial f(u,v)/\partial u\neq\partial f(x,y)/\partial x$... because what $f$ is and how it behaves has changed - its behaviour depends on what variables it is taking in and what it does to them.