Afraid your understanding is incorrect.

\(\displaystyle \dfrac{y-x \cdot \dfrac{y}{x}}{y^2} = 0\)

The $x$'s cancel out leaving $y-y$ in the numerator.

\(\displaystyle \dfrac{y-x \cdot \dfrac{x}{y}}{y^2}\)

on the other hand equals the 2nd expression you noted.

Multiply top and bottom by $y$ and multiply the two $x$'s to get $x^2$

This results in

$\dfrac{y^2 - x^2}{y^3}$