Du hast in der vorletzten Zeile das Minus vergessen.
\(\dfrac{-x(x-y^2)}{y} \\ =\dfrac{-x^2+xy^2}{y} \\ = xy -\dfrac{x^2}{y}\)
Alternativ:
\(\color{white}{=}\left(\dfrac{x^4}{y^2}-x^3\right) : \left(-\dfrac{x^2}{y}\right) \\ =\left(\dfrac{x^3(x-y^2)}{y^2}\right) : \left(-\dfrac{x^2}{y}\right)\\ =-\dfrac{x^3(x-y^2)}{x^2y}\\ =-\dfrac{x(x-y^2)}{y} \\ = xy -\dfrac{x^2}{y}\)